mate-desktop/mate-panel

MATE panel is being dragged when I touch it in the Cupertino layout

archisman-panigrahi opened this issue · 29 comments

I have a touch screen laptop running Ubuntu MATE 22.04.

Expected behaviour

When I touch the MATE panel in the Cupertino layout, it should register mouse-click-like events in the panel, instead of dragging the panel.

Actual behaviour

When I accidentally touch on the MATE panel, the panel is dragged to another location, which is inconvenient, because sometimes I end up dislocating the panel while trying to move an window.

However, when I try to drag the panel with mouse, nothing happens (as expected).

This only seems to happen in the Cupertino layout.

Steps to reproduce the behaviour

Use Cupertino layout in Ubuntu MATE 22.04 in a touch screen computer.
Try to press anywhere in the panel.
The panel will be dragged instead of opening the menu/application.

MATE general version

1.26.2

Package version

1.26.2-1

Linux Distribution

Ubuntu MATE 22.04

Link to bugreport of your Distribution (requirement)

https://bugs.launchpad.net/ubuntu/+source/mate-panel/+bug/2008656

I noted a question on askubuntu & Ubuntu-MATE's discourse (https://ubuntu-mate.community/t/mate-panel-is-being-dragged-when-i-touch-it-in-the-cupertino-layout/26388/2) on this, and can confirm I've experienced this as I reported on Ubuntu-MATE's discourse.

:slight_smile: Yep dead easy to re-create when using Cupertino....

Obvious workaround is using a different layout :slight_smile: ; whilst I've not tried them all here today, I've only encountered the issue you describe with Cupertino...

I also expressed an opinion (right or wrong) that it occurred before 22.04, but as 'Cupertino' is the only layout where I experienced this (and not a default) I may have ignored it (assuming it was my own error with my fat fingers..)

I will be happy to provide any relevant logs. Feel free to let me know.

This layout isn't from Mate, and i don`t see it in Mate-Ubuntu https://git.launchpad.net/ubuntu/+source/mate-panel/tree/data?h=ubuntu/lunar
Can you provide this layout file?

It is in the default Ubuntu MATE 22.04 setup. I don't know where it is from. It is available on MATE-Tweaks (https://github.com/ubuntu-mate/mate-tweak/blob/master/mate-tweak this has some relevant configurations)

I am using fedora, i don't touch mate-tweaks and i don't see this file in mate-tweak repo.
Sorry, without knowledge about this layout it isn't possible to help.

JSBern commented

I think it may actually deal with how plank interacts with the panel as I've had issues before where the panel shows up as an application in plank and when you close the application in plank it deletes the panel as the cupertino layout uses plank

JSBern commented

here is the layout file why it is called eleven I haven't the slightest file:///usr/share/mate-panel/layouts/eleven.layout

You need to upload the file :) I can't access to your box :)

JSBern commented

Sorry I tried github said to drag and drop,but that din't seem to work I'll have to figure out how to

JSBern commented

[Toplevel top]
expand=true
orientation=top
size=28

[Object briskmenu]
object-type=applet
applet-iid=BriskMenuFactory::BriskMenu
toplevel-id=top
position=0
locked=true

[Object appmenuapplet]
locked=true
position=10
toplevel-id=top
applet-iid=AppmenuAppletFactory::AppmenuApplet
object-type=applet

[Object notification-area]
object-type=applet
applet-iid=NotificationAreaAppletFactory::NotificationArea
toplevel-id=top
position=10
panel-right-stick=true
locked=true

[Object indicatorappletcomplete]
object-type=applet
applet-iid=IndicatorAppletCompleteFactory::IndicatorAppletComplete
toplevel-id=top
position=0
panel-right-stick=true
locked=true

JSBern commented

that is the whole thing

JSBern commented

and there is an eleven.dock file that has one word "plank" and that is it

I think it may actually deal with how plank interacts with the panel as I've had issues before where the panel shows up as an application in plank and when you close the application in plank it deletes the panel as the cupertino layout uses plank

What do you mean with plank?
Is it a new ice cream?

JSBern commented
JSBern commented

ricotz/plank on github I think

JSBern commented

I was just testing it right now(on desktop) and opening panel preferences while using plank makes the panels show up as apps in the dock and you can minimize and maximise (like make them disappear and reappear) the panels from plank, how it grabs control over the panel idk, but it seems to be able to

Hmm,
i have 22.04 installed in qemu VM with Cupertino layout enabled but i can't reproduce the issue. But maybe i don't understand what you mean with "panel is been dragged".
The panel is sticky under the pointer when you click on it and you move the panel to somewhere with the mouse?
This doesn't happen here in VM, i tried hard....
Can you confirm that this is the issue?
Are you on baremetal?

JSBern commented
JSBern commented

But maybe i don't understand what you mean with "panel is been dragged".

When I click on the panel with mouse/touchpad, nothing unusual happens.

But when I touch on the panel, and move my hand, the panel gets displaced. That's what I meant by drag.

The panel is sticky under the pointer when you click on it and you move the panel to somewhere with the mouse?

Panel does not move when I try to move it with mouse. The bug only occurs in touch screen.

Are you on baremetal?

Yes

I don't think whether Plank is running or not anything to do with the issue, but I will verify and keep you updated.

Thanks for clarification that it is a touchscreen issue. I misread the description and i don't have one, so i can't reproduce it.
Can you remove the appmenu applet for testing. It is third-party and not under active development anymore. I closed yesterday another issue which was causes by this applet. It seems buggy nowadays.
All other applets from this layout are Mate or Ubuntu-Mate standard applets. I don't think that those or the panel itself caused this issue, as they work with other layouts.
Debugging is simply try and error, remove an applet, testing, add the applet again, remove an other applet, and so on. I don't use the plank dock for myself. So i can't tell anything about it.
I am maintaining/using Mate in fedora since 2012 and i love stable vanila Mate desktop without third-party applications.

Honestly, with a touchscreen i would use gnome which have more manpower and probably some touchscreens for testing a technology which isn't standard in linux.

Can you remove the appmenu applet for testing. It is third-party and not under active development anymore. I closed yesterday another issue which was causes by this applet. It seems buggy nowadays.

Turns out that the appmenu global menu applet is the culprit. Both the Contemporary and Cupertino layouts have this applet and they suffer from the issue. Removing the applet fixes the issue.

Does anyone know how to configure this applet not to cause the bug?
I want to use global menu in MATE. In case the apmenu applet is not actively developed, is there any workaround?

Honestly, with a touchscreen i would use gnome which have more manpower and probably some touchscreens for testing a technology which isn't standard in linux.

This is an old Chromebook (with MrChromebox.tech UEFI) with a celeron processor, which cannot even properly display GNOME due to weak graphics capabilities, and but it flies on Ubuntu MATE.
While I don't extensively use touch, I occasionally use it to zoom in/out, and launch applications.

The fix for this in the appmenu app itself might be simple. If nobody's maintaining it it could be forked and fixed, hopefully by someone up for chasing down later bugs.

In
mate-desktop/mate-applets@86c68d4
I fix a similar issue in the timer applet under wayland, where the left click on an applet is actually the button RELEASE event on x11 but that does not seem to work on Wayland so I added code to catch the button press event. Without it, a left click on the timer applet did not start/stop the timer and instead made the whole panel "dodge" the mouse by moving to the top if it was not already there.

My guess is the touchscreen code may have issues with using a button-release event made from finger contact, and just like the mouse left button under wayland pass the unhandled event to the panel. Catch that, even if nothing is done with it, and the panel should stay put with the resulting updated appmenu applet in use.

I don't have a touchscreen so cannot test this myself

Is there a project homepage for appmenu?
Is it same as vala-panel-appmenu https://gitlab.com/vala-panel-project/vala-panel-appmenu? That project seems to be active (last commit was two months ago)

JSBern commented

Yes, it's vala-panel-appmenu. I would file out a report there and ask for help.
Can we close this report here as it is not related to mate-panel?
When mate-panel needs adjustments we can always re-open it.

Reported a bug there https://gitlab.com/vala-panel-project/vala-panel-appmenu/-/issues/379

I am closing this issue.

However, it would be great if MATE developers add some technical comments (like #1360 (comment), about what they think might be causing the issue) to the bug report in vala-panel-appmenu, because users (like me) may not know much about the technical details and terminology of what may be causing the issue.

Describe the issue as best your can. The dev will ask you for more infos.
It's a problem with GDKEvents https://docs.gtk.org/gdk3/struct.EventTouch.html
But sorry, i don't know anything about it.