mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
popover: Don't restore stale default widget
Only restore the saved default widget if the default hasn't been changed while the popover was visible.
This commit is contained in:
parent
b437f89c05
commit
775800f76e
@ -610,7 +610,8 @@ gtk_popover_unmap (GtkWidget *widget)
|
||||
gdk_window_hide (gtk_widget_get_window (widget));
|
||||
GTK_WIDGET_CLASS (gtk_popover_parent_class)->unmap (widget);
|
||||
|
||||
gtk_window_set_default (priv->window, priv->prev_default);
|
||||
if (gtk_window_get_default_widget (priv->window) == priv->default_widget)
|
||||
gtk_window_set_default (priv->window, priv->prev_default);
|
||||
g_clear_object (&priv->prev_default);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user