[gtk+/toplevel-embedding: 2/3] Unset toplevel flag when setting a parent window on a widget.
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/toplevel-embedding: 2/3] Unset toplevel flag when setting a parent window on a widget.
- Date: Wed, 22 Dec 2010 12:20:16 +0000 (UTC)
commit 027552afe060b5eda9d250685b9f23e839cf44d6
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Wed Dec 22 21:23:23 2010 +0900
Unset toplevel flag when setting a parent window on a widget.
This allows toplevels to be embedded.
gtk/gtkwidget.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 66838bc..740562e 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -9074,6 +9074,12 @@ gtk_widget_set_parent_window (GtkWidget *widget,
g_object_unref (old_parent_window);
if (parent_window)
g_object_ref (parent_window);
+
+ /* Unset toplevel flag when adding a parent window to a widget,
+ * this is the primary entry point to allow toplevels to be
+ * embeddable.
+ */
+ _gtk_widget_set_is_toplevel (widget, FALSE);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]