[gtk/present-toplevel-2: 8/79] x11: Stop using gdk_surface_get_state



commit 2234893553cf8ca7ed28b3a08448923994a1056d
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Feb 29 20:43:34 2020 -0500

    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 be8ddb214a..bcb17e6bdf 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 a53e880f2a..7bdf06bfa4 100644
--- a/gdk/x11/gdksurface-x11.c
+++ b/gdk/x11/gdksurface-x11.c
@@ -3882,7 +3882,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;
@@ -3904,7 +3904,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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]