[gtk/wip.win32.fixes: 148/151] gdksurface-win32.c: Rename window->surface in snap_*()




commit 566ed32472ef4c1b1816b1d11a3057751249325a
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Thu Jul 1 18:32:34 2021 +0800

    gdksurface-win32.c: Rename window->surface in snap_*()
    
    Since we are updating these functions, make the old GdkWindow-era
    variable names to match better the names we use nowadays.

 gdk/win32/gdksurface-win32.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index 38bdff2ded..dc5c4e5c29 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -2290,22 +2290,22 @@ stash_window (GdkSurface          *window,
 }
 
 static void
-snap_up (GdkSurface *window)
+snap_up (GdkSurface *surface)
 {
   SHORT maxysize;
   int x, y;
   int width, height;
   GdkWin32Surface *impl;
 
-  impl = GDK_WIN32_SURFACE (window);
+  impl = GDK_WIN32_SURFACE (surface);
 
   impl->snap_state = GDK_WIN32_AEROSNAP_STATE_FULLUP;
 
-  stash_window (window, impl);
+  stash_window (surface, impl);
 
   maxysize = GetSystemMetrics (SM_CYVIRTUALSCREEN) / impl->surface_scale;
   x = y = 0;
-  width = gdk_surface_get_width (window);
+  width = gdk_surface_get_width (surface);
 
   y = 0;
   height = maxysize;
@@ -2315,30 +2315,30 @@ snap_up (GdkSurface *window)
   width += impl->shadow_x;
   height += impl->shadow_y;
 
-  if (GDK_IS_TOPLEVEL (window))
+  if (GDK_IS_TOPLEVEL (surface))
     {
       impl->drag_move_resize_context.native_move_resize_pending = FALSE;
       impl->inhibit_configure = TRUE;
     }
 
-  gdk_win32_surface_move_resize (window, x, y, width, height);
+  gdk_win32_surface_move_resize (surface, x, y, width, height);
 }
 
 static void
-snap_left (GdkSurface  *window,
+snap_left (GdkSurface *surface,
            GdkMonitor *monitor,
            GdkMonitor *snap_monitor)
 {
   GdkRectangle rect;
   GdkWin32Surface *impl;
 
-  impl = GDK_WIN32_SURFACE (window);
+  impl = GDK_WIN32_SURFACE (surface);
 
   impl->snap_state = GDK_WIN32_AEROSNAP_STATE_HALFLEFT;
 
   gdk_win32_monitor_get_workarea (snap_monitor, &rect);
 
-  stash_window (window, impl);
+  stash_window (surface, impl);
 
   rect.width = rect.width / 2;
 
@@ -2347,32 +2347,32 @@ snap_left (GdkSurface  *window,
   rect.width = rect.width + impl->shadow_x;
   rect.height = rect.height + impl->shadow_y;
 
-  if (GDK_IS_TOPLEVEL (window))
+  if (GDK_IS_TOPLEVEL (surface))
     {
       impl->drag_move_resize_context.native_move_resize_pending = FALSE;
       impl->inhibit_configure = TRUE;
     }
 
-  gdk_win32_surface_move_resize (window,
+  gdk_win32_surface_move_resize (surface,
                                  rect.x, rect.y,
                                  rect.width, rect.height);
 }
 
 static void
-snap_right (GdkSurface  *window,
+snap_right (GdkSurface *surface,
             GdkMonitor *monitor,
             GdkMonitor *snap_monitor)
 {
   GdkRectangle rect;
   GdkWin32Surface *impl;
 
-  impl = GDK_WIN32_SURFACE (window);
+  impl = GDK_WIN32_SURFACE (surface);
 
   impl->snap_state = GDK_WIN32_AEROSNAP_STATE_HALFRIGHT;
 
   gdk_win32_monitor_get_workarea (snap_monitor, &rect);
 
-  stash_window (window, impl);
+  stash_window (surface, impl);
 
   rect.width = rect.width / 2;
   rect.x += rect.width;
@@ -2382,13 +2382,13 @@ snap_right (GdkSurface  *window,
   rect.width = rect.width + impl->shadow_x;
   rect.height = rect.height + impl->shadow_y;
 
-  if (GDK_IS_TOPLEVEL (window))
+  if (GDK_IS_TOPLEVEL (surface))
     {
       impl->drag_move_resize_context.native_move_resize_pending = FALSE;
       impl->inhibit_configure = TRUE;
     }
 
-  gdk_win32_surface_move_resize (window,
+  gdk_win32_surface_move_resize (surface,
                                  rect.x, rect.y,
                                  rect.width, rect.height);
 }


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