diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-11-19 22:18:23 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-11-19 22:18:23 +0000 |
commit | 0e8a7fb48e88c408040a6d422b7f20ecd35271fc (patch) | |
tree | 2aad575fc50eafb2eab4b34f0dbbaf6c62814a06 /gtk/gtkplug.c | |
parent | 2268abe48fd5fbfaa25f9468e3843ac1e84d9c89 (diff) | |
download | gtk+-0e8a7fb48e88c408040a6d422b7f20ecd35271fc.tar.gz |
(Fixes related to #64428, Michael Meeks)
Mon Nov 19 17:11:23 2001 Owen Taylor <otaylor@redhat.com>
(Fixes related to #64428, Michael Meeks)
* gtk/gtkplug.c (gtk_plug_set_is_child): Unmap the
widget, so it gets mapped again properly when we
add to a parent.
* gtk/gtkplug.c (_gtk_plug_add_to_socket): Set
plug->socket_window.
* gtk/gtkplug.c (_gtk_plug_remove_from_socket): Set
socket_window to NULL, not FALSE.
Diffstat (limited to 'gtk/gtkplug.c')
-rw-r--r-- | gtk/gtkplug.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c index f937fa4569..c04aa81ab9 100644 --- a/gtk/gtkplug.c +++ b/gtk/gtkplug.c @@ -180,6 +180,14 @@ gtk_plug_set_is_child (GtkPlug *plug, plug->modality_group = NULL; } + /* As a toplevel, the MAPPED flag doesn't correspond + * to whether the widget->window is mapped; we unmap + * here, but don't bother remapping -- we will get mapped + * by gtk_widget_set_parent (). + */ + if (GTK_WIDGET_MAPPED (plug)) + gtk_widget_unmap (GTK_WIDGET (plug)); + GTK_WIDGET_UNSET_FLAGS (plug, GTK_TOPLEVEL); gtk_container_set_resize_mode (GTK_CONTAINER (plug), GTK_RESIZE_PARENT); @@ -218,8 +226,11 @@ _gtk_plug_add_to_socket (GtkPlug *plug, gtk_plug_set_is_child (plug, TRUE); plug->same_app = TRUE; + socket->same_app = TRUE; socket->plug_widget = widget; + plug->socket_window = GTK_WIDGET (socket)->window; + if (GTK_WIDGET_REALIZED (widget)) gdk_window_reparent (widget->window, plug->socket_window, 0, 0); @@ -229,7 +240,7 @@ _gtk_plug_add_to_socket (GtkPlug *plug, } /** - * _gtk_plug_add_to_socket: + * _gtk_plug_remove_from_socket: * @plug: a #GtkPlug * @socket: a #GtkSocket * @@ -267,7 +278,7 @@ _gtk_plug_remove_from_socket (GtkPlug *plug, socket->same_app = FALSE; plug->same_app = FALSE; - plug->socket_window = FALSE; + plug->socket_window = NULL; gtk_plug_set_is_child (plug, FALSE); |