Commit 3be4971e authored by Carlos Garnacho's avatar Carlos Garnacho

GtkPopover: Ensure we unset modality before unparenting the popover

Otherwise the gtk_grab_remove() calls on widget destruction will happen
on the default window group, which may leave the real window group
of the popover with a dangling pointer if it is not the default one.

This could be seen on the inspector, open a popover in the properties
list and close the window with alt-F4.
parent 197e42ef
......@@ -188,6 +188,8 @@ static void gtk_popover_update_relative_to (GtkPopover *popover,
static void gtk_popover_set_state (GtkPopover *popover,
guint state);
static void gtk_popover_invalidate_borders (GtkPopover *popover);
static void gtk_popover_apply_modality (GtkPopover *popover,
gboolean modal);
......@@ -329,6 +331,9 @@ gtk_popover_dispose (GObject *object)
GtkPopover *popover = GTK_POPOVER (object);
GtkPopoverPrivate *priv = popover->priv;
if (priv->modal)
gtk_popover_apply_modality (popover, FALSE);
if (priv->window)
g_signal_handlers_disconnect_by_data (priv->window, popover);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment