diff options
author | Matthias Clasen <mclasen@redhat.com> | 2011-09-02 21:40:42 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-09-02 21:40:42 -0400 |
commit | be152f9b6196849c99c54afe5a0f651d08bf4626 (patch) | |
tree | c7b9a0081d6fbf595c1e1d9bd5972bdd993d9bd8 /gtk/gtkplug.c | |
parent | ef4690d511e051a75ec948fab00035e3f5007939 (diff) | |
download | gtk+-be152f9b6196849c99c54afe5a0f651d08bf4626.tar.gz |
GtkPlug: preserve map/unmap invariants
Diffstat (limited to 'gtk/gtkplug.c')
-rw-r--r-- | gtk/gtkplug.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c index e0c3836691..1d4240d0c3 100644 --- a/gtk/gtkplug.c +++ b/gtk/gtkplug.c @@ -1131,14 +1131,14 @@ gtk_plug_map (GtkWidget *widget) GtkBin *bin = GTK_BIN (widget); GtkPlug *plug = GTK_PLUG (widget); GtkWidget *child; - + gtk_widget_set_mapped (widget, TRUE); child = gtk_bin_get_child (bin); if (child != NULL && gtk_widget_get_visible (child) && - !gtk_widget_get_mapped (child)) - gtk_widget_map (child); + !gtk_widget_get_mapped (child)) + gtk_widget_map (child); xembed_set_info (gtk_widget_get_window (GTK_WIDGET (plug)), XEMBED_MAPPED); @@ -1157,6 +1157,7 @@ gtk_plug_unmap (GtkWidget *widget) { GtkPlug *plug = GTK_PLUG (widget); GdkWindow *window; + GtkWidget *child; window = gtk_widget_get_window (widget); @@ -1164,6 +1165,10 @@ gtk_plug_unmap (GtkWidget *widget) gdk_window_hide (window); + child = gtk_bin_get_child (GTK_BIN (widget)); + if (child != NULL) + gtk_widget_unmap (child); + xembed_set_info (gtk_widget_get_window (GTK_WIDGET (plug)), 0); gdk_synthesize_window_state (window, |