window: Unparent popover before unmapping/unrealizing

Otherwise spurious invariants warnings may happen before the popover
is removed from the window.
This commit is contained in:
Carlos Garnacho 2015-02-02 16:13:30 +01:00
parent cc511268a0
commit d053db289e

View File

@ -11695,6 +11695,11 @@ _gtk_window_remove_popover (GtkWindow *window,
if (!data)
return;
g_object_ref (popover);
gtk_widget_unparent (popover);
popover_unmap (popover, data);
if (gtk_widget_get_realized (GTK_WIDGET (window)))
popover_unrealize (popover, data, window);
@ -11704,6 +11709,7 @@ _gtk_window_remove_popover (GtkWindow *window,
_gtk_container_accessible_remove_child (GTK_CONTAINER_ACCESSIBLE (accessible),
gtk_widget_get_accessible (popover), -1);
popover_destroy (data);
g_object_unref (popover);
}
void