From f78f8655a6f40719e656c46cdc10d41189756d30 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 29 Feb 2020 20:43:34 -0500 Subject: [PATCH] x11: Stop using gdk_surface_get_state All the surfaces we are dealing with here are toplevels. --- gdk/x11/gdkdisplay-x11.c | 2 +- gdk/x11/gdkmonitor-x11.c | 2 +- gdk/x11/gdksurface-x11.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c index e5e367eb30..040844b247 100644 --- a/gdk/x11/gdkdisplay-x11.c +++ b/gdk/x11/gdkdisplay-x11.c @@ -378,7 +378,7 @@ do_net_wm_state_changes (GdkSurface *surface) gdk_surface_get_surface_type (surface) != GDK_SURFACE_TOPLEVEL) return; - old_state = gdk_surface_get_state (surface); + old_state = gdk_toplevel_get_state (GDK_TOPLEVEL (surface)); set = unset = 0; diff --git a/gdk/x11/gdkmonitor-x11.c b/gdk/x11/gdkmonitor-x11.c index 970095c11d..341917ad8c 100644 --- a/gdk/x11/gdkmonitor-x11.c +++ b/gdk/x11/gdkmonitor-x11.c @@ -44,7 +44,7 @@ gdk_monitor_has_fullscreen_window (GdkMonitor *monitor) { surface = l->data; - if ((gdk_surface_get_state (surface) & GDK_SURFACE_STATE_FULLSCREEN) == 0) + if ((gdk_toplevel_get_state (GDK_TOPLEVEL (surface)) & GDK_SURFACE_STATE_FULLSCREEN) == 0) continue; if (gdk_surface_get_fullscreen_mode (surface) == GDK_FULLSCREEN_ON_ALL_MONITORS || diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index e3d39a3df3..ab65449f2b 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -3894,7 +3894,7 @@ check_maximize (MoveResizeData *mv_resize, if (mv_resize->is_resize) return; - state = gdk_surface_get_state (mv_resize->moveresize_surface); + state = gdk_toplevel_get_state (GDK_TOPLEVEL (mv_resize->moveresize_surface)); if (state & GDK_SURFACE_STATE_MAXIMIZED) return; @@ -3916,7 +3916,7 @@ check_unmaximize (MoveResizeData *mv_resize, if (mv_resize->is_resize) return; - state = gdk_surface_get_state (mv_resize->moveresize_surface); + state = gdk_toplevel_get_state (GDK_TOPLEVEL (mv_resize->moveresize_surface)); if ((state & (GDK_SURFACE_STATE_MAXIMIZED | GDK_SURFACE_STATE_TILED)) == 0) return;