gtkwindow: Correct device check

This function to revoke implicit grabs may be called with a NULL
device, which means all devices should be revoked. Fix the check
so this actually happens.

Fixes implicit grabs (maybe) being unset in result to a GTK grab.
This commit is contained in:
Carlos Garnacho 2020-04-24 23:04:27 +02:00
parent 2a877a9be5
commit d104efe06e

View File

@ -7989,7 +7989,7 @@ gtk_window_maybe_revoke_implicit_grab (GtkWindow *window,
if (focus->toplevel != window)
continue;
if (device && focus->device == device &&
if ((!device || focus->device == device) &&
focus->target != grab_widget &&
!gtk_widget_is_ancestor (focus->target, grab_widget))
gtk_window_set_pointer_focus_grab (window,