mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
gdk: Ignore synthesized leave events out of touch events
Certain crossing modes notify about synthesized events, where the pointer didn't really leave the window. Unsetting the stage from the device at that time is incorrect, and will leave all remaining touches unable to pick coordinates, so silently eaten away. https://bugzilla.gnome.org/show_bug.cgi?id=750496
This commit is contained in:
parent
2d5b5aa82a
commit
7ed3714a94
@ -248,7 +248,10 @@ clutter_gdk_handle_event (GdkEvent *gdk_event)
|
||||
clutter_event_set_source_device (event, source_device);
|
||||
if (gdk_event->type == GDK_ENTER_NOTIFY)
|
||||
_clutter_input_device_set_stage (clutter_event_get_device (event), stage);
|
||||
else
|
||||
else if (gdk_event->type == GDK_LEAVE_NOTIFY &&
|
||||
gdk_event->crossing.mode != GDK_CROSSING_TOUCH_BEGIN &&
|
||||
gdk_event->crossing.mode != GDK_CROSSING_TOUCH_END &&
|
||||
gdk_event->crossing.mode != GDK_CROSSING_DEVICE_SWITCH)
|
||||
_clutter_input_device_set_stage (clutter_event_get_device (event), NULL);
|
||||
CLUTTER_NOTE (EVENT, "Crossing %s [%.2f, %.2f]",
|
||||
event->type == CLUTTER_ENTER ? "enter" : "leave",
|
||||
|
Loading…
Reference in New Issue
Block a user