popover: Unset the grab when the popover loses its parent

This ensures the grab and signal handlers are removed if the parent goes
NULL.
This commit is contained in:
Carlos Garnacho 2015-02-03 12:03:22 +01:00
parent d053db289e
commit 4ba2c9ad87

View File

@ -1446,6 +1446,9 @@ _gtk_popover_parent_hierarchy_changed (GtkWidget *widget,
g_object_ref (popover);
if (gtk_widget_has_grab (GTK_WIDGET (popover)))
gtk_popover_apply_modality (popover, FALSE);
if (priv->window)
_gtk_window_remove_popover (priv->window, GTK_WIDGET (popover));