[gtk+] GtkPopover: Ensure we unset modality before unparenting the popover
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkPopover: Ensure we unset modality before unparenting the popover
- Date: Wed, 16 Dec 2015 19:49:35 +0000 (UTC)
commit 3be4971e05e6aeebeddcd7a38ceebc95330b4f03
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Dec 16 20:25:54 2015 +0100
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.
gtk/gtkpopover.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index 4c55577..53f004e 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]