GNOME Bugzilla – Bug 738888
wayland clients receive the button release event finishing a window drag
Last modified: 2021-07-05 13:50:36 UTC
AFAIK the compositor is supposed to consume the whole motion/motion/.../release events after xdg_surface.move()/resize(), or at least it used to do. Right now the motion events are consumed, but the button release makes it to the client, possibly triggering further actions after the window drag finished.
Created attachment 288975 [details] [review] core: end-of-grab button releases must be consumed by the window Returning FALSE here gets the button release event propagated to the client on wayland, which is unexpected after xdg_surface.move/resize() have been called.
Review of attachment 288975 [details] [review]: Hm, it seems I added this in https://git.gnome.org/browse/mutter/commit/?id=a5cca52 If you're seeing problems with it, let's try this for now, but we need to make sure Xwayland doesn't get stuck with it.
(In reply to comment #2) > Review of attachment 288975 [details] [review]: > > Hm, it seems I added this in > https://git.gnome.org/browse/mutter/commit/?id=a5cca52 > > If you're seeing problems with it, let's try this for now, Yeah, gdk/wayland is aware/dependent on this behavior since long ago: commit eedd1ec92f6c035c00f4deaef748173f0ed36f06 Author: Rob Bradford <rob@linux.intel.com> Date: Mon Jan 9 16:00:14 2012 +0000 wayland: Make the resize and move functions use gdk_device_ungrab Now that grab and ungrab vfuncs are implemented on GdkDevice then we can use gdk_device_ungrab to break the implicit grab created by the button press that triggered the resize and move. So this brings side effects, like closing popovers that were opened before dragging, etc. > but we need to make > sure Xwayland doesn't get stuck with it. Hmm, it indeed does... although AFAICS what X11 clients would be expecting here is a XI_Leave/LeaveNotify event with (XI)NotifyGrab mode when the compositor grabs the device, or maybe even a fake grab somewhere else. I guess mutter is responsible to do this. I will push the patch and look into this, I'm leaving the bug open at the moment.
Comment on attachment 288975 [details] [review] core: end-of-grab button releases must be consumed by the window Attachment 288975 [details] pushed as 8819d9c - core: end-of-grab button releases must be consumed by the window
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/mutter/-/issues/ Thank you for your understanding and your help.