[gtk+/popovers] window: Remove popovers on dispose() before unsetting focus.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/popovers] window: Remove popovers on dispose() before unsetting focus.
- Date: Mon, 13 Jan 2014 11:55:16 +0000 (UTC)
commit 7ff4dd40f17411ac59b4d75e5faaf98f162487fe
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 d88ddde..2e28b84 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -2624,13 +2624,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]