Merge branch 'wip/carlosg/implicit-grabs-on-leave' into 'master'

Handle implicit grabs on leave events

Closes #13

See merge request GNOME/gtk!1397
This commit is contained in:
Matthias Clasen 2020-02-07 07:06:45 +00:00
commit c7ab02d38c
2 changed files with 9 additions and 4 deletions

View File

@ -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:

View File

@ -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;