[gtk/present-toplevel-2: 71/178] x11: Stop using gdk_surface_get_state



commit 76e01793766083ef4a747e5d35d1fedb53785068
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 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 411f0b5a6e..3e87a6719a 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]