gtkmain: Ensure to emit real GDK_LEAVE_NOTIFY events.

If we got a GDK_LEAVE_NOTIFY event from GDK, we would reset the
GtkPointerFocus, but the event would be silently consumed.
This commit is contained in:
Carlos Garnacho 2017-09-19 18:18:07 +02:00
parent fb81d7fc8f
commit e0a3c9d2de

View File

@ -1494,6 +1494,10 @@ handle_pointing_event (GdkEvent *event)
case GDK_TOUCH_END: case GDK_TOUCH_END:
case GDK_TOUCH_CANCEL: case GDK_TOUCH_CANCEL:
old_target = update_pointer_focus_state (toplevel, event, NULL); old_target = update_pointer_focus_state (toplevel, event, NULL);
if (event->type == GDK_LEAVE_NOTIFY)
gtk_synthesize_crossing_events (toplevel, old_target, NULL,
event, event->crossing.mode);
break; break;
case GDK_ENTER_NOTIFY: case GDK_ENTER_NOTIFY:
if (event->crossing.mode == GDK_CROSSING_GRAB || if (event->crossing.mode == GDK_CROSSING_GRAB ||