mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-23 23:34:06 +00:00
Moved location of unsetting parent window inside gtk_widget_unparent().
Make sure to do this after the widget is unrealized.
This commit is contained in:
parent
fdba9f281d
commit
2dfa855bc4
@ -3714,12 +3714,6 @@ gtk_widget_unparent (GtkWidget *widget)
|
||||
g_object_freeze_notify (G_OBJECT (widget));
|
||||
nqueue = g_object_notify_queue_freeze (G_OBJECT (widget), _gtk_widget_child_property_notify_context);
|
||||
|
||||
/* Need to unset the parent window early, this can result in
|
||||
* an additional "hierarchy-changed" propagation if we are removing
|
||||
* a parented GtkWindow from the hierarchy.
|
||||
*/
|
||||
gtk_widget_set_parent_window (widget, NULL);
|
||||
|
||||
toplevel = gtk_widget_get_toplevel (widget);
|
||||
if (gtk_widget_is_toplevel (toplevel))
|
||||
_gtk_window_unset_focus_and_default (GTK_WINDOW (toplevel), widget);
|
||||
@ -3755,6 +3749,12 @@ gtk_widget_unparent (GtkWidget *widget)
|
||||
gtk_widget_unrealize (widget);
|
||||
}
|
||||
|
||||
/* Need to unset the parent window early, this can result in
|
||||
* an additional "hierarchy-changed" propagation if we are removing
|
||||
* a parented GtkWindow from the hierarchy.
|
||||
*/
|
||||
gtk_widget_set_parent_window (widget, NULL);
|
||||
|
||||
/* Removing a widget from a container restores the child visible
|
||||
* flag to the default state, so it doesn't affect the child
|
||||
* in the next parent.
|
||||
|
Loading…
Reference in New Issue
Block a user