[gtk+: 36/54] window: Remove popovers on dispose() before unsetting focus.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+: 36/54] window: Remove popovers on dispose() before unsetting focus.
- Date: Wed, 22 Jan 2014 17:47:50 +0000 (UTC)
commit a3b3b4621c716097212f774eaf3202c1948bd5bf
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Jan 13 12:33:33 2014 +0100
window: Remove popovers on dispose() before unsetting focus.
The popovers may return keyboard grabs to previous widgets, so if
called after unsetting the focus, the window may be left with a
dangling GtkWidget that would cause crash at later dispose() calls.
gtk/gtkwindow.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 84792c7..d4f6e98 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -2664,13 +2664,13 @@ gtk_window_dispose (GObject *object)
GtkWindow *window = GTK_WINDOW (object);
GtkWindowPrivate *priv = window->priv;
+ g_hash_table_remove_all (priv->popovers);
+
gtk_window_set_focus (window, NULL);
gtk_window_set_default (window, NULL);
unset_titlebar (window);
remove_attach_widget (window);
- g_hash_table_remove_all (priv->popovers);
-
G_OBJECT_CLASS (gtk_window_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]