[gtk+/toplevel-embedding: 6/12] Moved location of unsetting parent window inside gtk_widget_unparent().
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/toplevel-embedding: 6/12] Moved location of unsetting parent window inside gtk_widget_unparent().
- Date: Wed, 29 Dec 2010 08:16:01 +0000 (UTC)
commit 17e24a55357cf66973f7791296774f562bf88bb6
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Fri Dec 24 12:35:27 2010 +0900
Moved location of unsetting parent window inside gtk_widget_unparent().
Make sure to do this after the widget is unrealized.
gtk/gtkwidget.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b43e30b..3acf321 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3712,12 +3712,6 @@ gtk_widget_unparent (GtkWidget *widget)
g_object_freeze_notify (G_OBJECT (widget));
nqueue = g_object_notify_queue_freeze (G_OBJECT (widget), _gtk_widget_child_property_notify_context);
- /* Need to unset the parent window early, this can result in
- * an additional "hierarchy-changed" propagation if we are removing
- * a parented GtkWindow from the hierarchy.
- */
- gtk_widget_set_parent_window (widget, NULL);
-
toplevel = gtk_widget_get_toplevel (widget);
if (gtk_widget_is_toplevel (toplevel))
_gtk_window_unset_focus_and_default (GTK_WINDOW (toplevel), widget);
@@ -3753,6 +3747,12 @@ gtk_widget_unparent (GtkWidget *widget)
gtk_widget_unrealize (widget);
}
+ /* Need to unset the parent window early, this can result in
+ * an additional "hierarchy-changed" propagation if we are removing
+ * a parented GtkWindow from the hierarchy.
+ */
+ gtk_widget_set_parent_window (widget, NULL);
+
/* Removing a widget from a container restores the child visible
* flag to the default state, so it doesn't affect the child
* in the next parent.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]