diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-02-29 20:32:15 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-03-12 14:56:20 -0400 |
commit | 6edff8cd67b18a085418891667e11d620b3fa4d5 (patch) | |
tree | f7711411a5b10f27fe266e096fe4b3c6dae3c03b /gtk/gtkwindow.c | |
parent | 92668816911ed4ae3a105b48e5ffc74a79132356 (diff) | |
download | gtk+-6edff8cd67b18a085418891667e11d620b3fa4d5.tar.gz |
gtk: use toplevel state getter
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r-- | gtk/gtkwindow.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index ad8089049d..f59b9429da 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -4956,7 +4956,7 @@ gtk_window_unmap (GtkWidget *widget) } priv->configure_notify_received = FALSE; - state = gdk_surface_get_state (priv->surface); + state = gdk_toplevel_get_state (GDK_TOPLEVEL (priv->surface)); priv->minimize_initially = (state & GDK_SURFACE_STATE_MINIMIZED) != 0; priv->maximize_initially = (state & GDK_SURFACE_STATE_MAXIMIZED) != 0; priv->stick_initially = (state & GDK_SURFACE_STATE_STICKY) != 0; @@ -5868,7 +5868,7 @@ surface_state_changed (GtkWidget *widget) GdkSurfaceState new_surface_state; GdkSurfaceState changed_mask; - new_surface_state = gdk_surface_get_state (priv->surface); + new_surface_state = gdk_toplevel_get_state (GDK_TOPLEVEL (priv->surface)); changed_mask = new_surface_state ^ priv->state; priv->state = new_surface_state; @@ -6605,7 +6605,7 @@ gtk_window_get_state (GtkWindow *window) GtkWindowPrivate *priv = gtk_window_get_instance_private (window); if (priv->surface) - return gdk_surface_get_state (priv->surface); + return gdk_toplevel_get_state (GDK_TOPLEVEL (priv->surface)); return 0; } @@ -8679,7 +8679,7 @@ ensure_state_flag_backdrop (GtkWidget *widget) GtkWindowPrivate *priv = gtk_window_get_instance_private (GTK_WINDOW (widget)); gboolean surface_focused = TRUE; - surface_focused = gdk_surface_get_state (priv->surface) & GDK_SURFACE_STATE_FOCUSED; + surface_focused = gdk_toplevel_get_state (GDK_TOPLEVEL (priv->surface)) & GDK_SURFACE_STATE_FOCUSED; if (!surface_focused) gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_BACKDROP, FALSE); |