After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785347 - Implicit grabs not working on wayland
Implicit grabs not working on wayland
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 784879 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-07-24 15:38 UTC by Carlos Garnacho
Modified: 2017-12-01 07:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wayland: Update button state on motion/button events (1.47 KB, patch)
2017-07-24 15:39 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2017-07-24 15:38:55 UTC
Implicit pointer grabs get broken as soon as the pointer leaves the surface. There is some checks on MetaWaylandPointer so the grabs are not broken while button_count>0, but they get fooled because Clutter sets no modifier/button state on crossing events, but they are used to update the button count, this results on button count being 0 when checked, and the implicit grab being broken.

I think this was broken by the patches in bug #755164, so should only happen on master, I'm attaching a patch to fix this.
Comment 1 Carlos Garnacho 2017-07-24 15:39:25 UTC
Created attachment 356313 [details] [review]
wayland: Update button state on motion/button events

More specifically, avoid crossing events, since clutter does not set
modifier/button state on those. Fixes implicit grabs being broken when
the pointer moves past the surface boundaries.
Comment 2 Florian Müllner 2017-07-24 15:47:08 UTC
Review of attachment 356313 [details] [review]:

OK
Comment 3 Carlos Garnacho 2017-07-24 16:01:23 UTC
That was quick :). Pushed without the button event overcompensation, some bits
already do rely on pre-event button state. It could be more intuitive, but I
won't touch this here.

Attachment 356313 [details] pushed as 5db48fa - wayland: Update button state on motion/button events
Comment 4 Olivier Fourdan 2017-12-01 07:50:42 UTC
*** Bug 784879 has been marked as a duplicate of this bug. ***