forked from AuroraMiddleware/gtk
gtkwindow: Unset focus grab_widget if it ends up unmapped
This may result on the later emission of crossing events, with one of the sides being already unmapped/unrealized. The widget being unmapped will result on repick and emission of a set of crossing events anyway.
This commit is contained in:
parent
1ce79b29e3
commit
58eaf5ca16
@ -11292,6 +11292,11 @@ gtk_window_update_pointer_focus_on_state_change (GtkWindow *window,
|
||||
|
||||
gtk_pointer_focus_ref (focus);
|
||||
|
||||
if (focus->grab_widget &&
|
||||
(focus->grab_widget == widget ||
|
||||
gtk_widget_is_ancestor (focus->grab_widget, widget)))
|
||||
gtk_pointer_focus_set_implicit_grab (focus, NULL);
|
||||
|
||||
if (GTK_WIDGET (focus->toplevel) == widget)
|
||||
{
|
||||
/* Unmapping the toplevel, remove pointer focus */
|
||||
|
Loading…
Reference in New Issue
Block a user