mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
popover: Hide widget first when disposing
In order to ensure invariants are kept.
This commit is contained in:
parent
15f7170358
commit
cf7bb9a3bf
@ -235,6 +235,8 @@ gtk_popover_dispose (GObject *object)
|
||||
GtkPopover *popover = GTK_POPOVER (object);
|
||||
GtkPopoverPrivate *priv = popover->priv;
|
||||
|
||||
gtk_widget_set_visible (GTK_WIDGET (object), FALSE);
|
||||
|
||||
if (priv->window)
|
||||
_gtk_window_remove_popover (priv->window, GTK_WIDGET (object));
|
||||
|
||||
@ -249,7 +251,6 @@ gtk_popover_dispose (GObject *object)
|
||||
priv->prev_focus_widget = NULL;
|
||||
}
|
||||
|
||||
gtk_widget_set_visible (GTK_WIDGET (object), FALSE);
|
||||
G_OBJECT_CLASS (gtk_popover_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user