summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/gtkwindow.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 505f806825..eae7baaec0 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4954,14 +4954,14 @@ gtk_window_show (GtkWidget *widget)
GtkWindow *window = GTK_WINDOW (widget);
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
+ _gtk_widget_set_visible_flag (widget, TRUE);
+
gtk_css_node_validate (gtk_widget_get_css_node (widget));
gtk_widget_realize (widget);
gtk_window_check_resize (window);
- GTK_WIDGET_CLASS (gtk_window_parent_class)->show (widget);
-
gtk_widget_map (widget);
if (!priv->focus_widget)
@@ -4982,7 +4982,8 @@ gtk_window_hide (GtkWidget *widget)
GtkWindow *window = GTK_WINDOW (widget);
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
- GTK_WIDGET_CLASS (gtk_window_parent_class)->hide (widget);
+ _gtk_widget_set_visible_flag (widget, FALSE);
+ gtk_widget_unmap (widget);
if (priv->modal)
gtk_grab_remove (widget);