GNOME Bugzilla – Bug 785347
Implicit grabs not working on wayland
Last modified: 2017-12-01 07:50:42 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.
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.
Review of attachment 356313 [details] [review]: OK
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
*** Bug 784879 has been marked as a duplicate of this bug. ***