mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-17 07:30:09 +00:00
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.
This commit is contained in:
parent
197e42efd8
commit
3be4971e05
@ -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);
|
||||
|
||||
G_DEFINE_TYPE_WITH_PRIVATE (GtkPopover, gtk_popover, GTK_TYPE_BIN)
|
||||
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user