mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
GtkPlug: preserve map/unmap invariants
This commit is contained in:
parent
ef4690d511
commit
be152f9b61
@ -1131,14 +1131,14 @@ gtk_plug_map (GtkWidget *widget)
|
|||||||
GtkBin *bin = GTK_BIN (widget);
|
GtkBin *bin = GTK_BIN (widget);
|
||||||
GtkPlug *plug = GTK_PLUG (widget);
|
GtkPlug *plug = GTK_PLUG (widget);
|
||||||
GtkWidget *child;
|
GtkWidget *child;
|
||||||
|
|
||||||
gtk_widget_set_mapped (widget, TRUE);
|
gtk_widget_set_mapped (widget, TRUE);
|
||||||
|
|
||||||
child = gtk_bin_get_child (bin);
|
child = gtk_bin_get_child (bin);
|
||||||
if (child != NULL &&
|
if (child != NULL &&
|
||||||
gtk_widget_get_visible (child) &&
|
gtk_widget_get_visible (child) &&
|
||||||
!gtk_widget_get_mapped (child))
|
!gtk_widget_get_mapped (child))
|
||||||
gtk_widget_map (child);
|
gtk_widget_map (child);
|
||||||
|
|
||||||
xembed_set_info (gtk_widget_get_window (GTK_WIDGET (plug)), XEMBED_MAPPED);
|
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);
|
GtkPlug *plug = GTK_PLUG (widget);
|
||||||
GdkWindow *window;
|
GdkWindow *window;
|
||||||
|
GtkWidget *child;
|
||||||
|
|
||||||
window = gtk_widget_get_window (widget);
|
window = gtk_widget_get_window (widget);
|
||||||
|
|
||||||
@ -1164,6 +1165,10 @@ gtk_plug_unmap (GtkWidget *widget)
|
|||||||
|
|
||||||
gdk_window_hide (window);
|
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);
|
xembed_set_info (gtk_widget_get_window (GTK_WIDGET (plug)), 0);
|
||||||
|
|
||||||
gdk_synthesize_window_state (window,
|
gdk_synthesize_window_state (window,
|
||||||
|
Loading…
Reference in New Issue
Block a user