diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c index 887ce9bd14..d8c1d35beb 100644 --- a/gtk/gtkmain.c +++ b/gtk/gtkmain.c @@ -1742,9 +1742,14 @@ handle_pointing_event (GdkEvent *event) switch ((guint) event->any.type) { case GDK_LEAVE_NOTIFY: - if (event->crossing.mode == GDK_CROSSING_GRAB || - event->crossing.mode == GDK_CROSSING_UNGRAB) - break; + if (event->crossing.mode == GDK_CROSSING_NORMAL && + gtk_window_lookup_pointer_focus_implicit_grab (toplevel, device, NULL)) + { + /* We have an implicit grab, wait for the corresponding + * GDK_CROSSING_UNGRAB. + */ + break; + } G_GNUC_FALLTHROUGH; case GDK_TOUCH_END: case GDK_TOUCH_CANCEL: diff --git a/gtk/gtkrootprivate.h b/gtk/gtkrootprivate.h index aae7a674a5..41f1360673 100644 --- a/gtk/gtkrootprivate.h +++ b/gtk/gtkrootprivate.h @@ -25,7 +25,7 @@ struct _GtkRootInterface GtkConstraintSolver * gtk_root_get_constraint_solver (GtkRoot *self); -enum { +typedef enum { GTK_ROOT_PROP_FOCUS_WIDGET, GTK_ROOT_NUM_PROPERTIES } GtkRootProperties;