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.

https://bugzilla.gnome.org/show_bug.cgi?id=785347
This commit is contained in:
Carlos Garnacho 2017-07-24 17:29:37 +02:00
parent b0c54b6675
commit 5db48faca4

View File

@ -606,8 +606,13 @@ meta_wayland_pointer_update (MetaWaylandPointer *pointer,
{
repick_for_event (pointer, event);
if (event->type == CLUTTER_MOTION ||
event->type == CLUTTER_BUTTON_PRESS ||
event->type == CLUTTER_BUTTON_RELEASE)
{
pointer->button_count = count_buttons (event);
}
}
static void
notify_motion (MetaWaylandPointer *pointer,