[gtk/fix-3728-3799: 3/3] GDK-Win32: Some cleanups




commit 0bc93bca9d9ac4f363d8e2e2acf2bb52cda816c9
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Fri Jul 2 10:21:31 2021 +0800

    GDK-Win32: Some cleanups
    
    We aren't really using the inhibit_configure field in GdkWin32Surface,
    so just drop it.  Also drop a function that is now gone in
    gdkprivate-win32.h, and fix the formatting a bit.

 gdk/win32/gdkevents-win32.c  | 4 +---
 gdk/win32/gdkprivate-win32.h | 8 +++-----
 gdk/win32/gdksurface-win32.c | 3 +--
 gdk/win32/gdksurface-win32.h | 1 -
 4 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index d8baaed803..f29735c36c 100644
--- a/gdk/win32/gdkevents-win32.c
+++ b/gdk/win32/gdkevents-win32.c
@@ -1246,7 +1246,7 @@ synthesize_crossing_events (GdkDisplay                 *display,
  * Returns FALSE if configure events should be inhibited,
  * TRUE otherwise.
  */
-gboolean
+void
 _gdk_win32_get_window_rect (GdkSurface *window,
                             RECT      *rect)
 {
@@ -1273,8 +1273,6 @@ _gdk_win32_get_window_rect (GdkSurface *window,
   rect->top = point.y;
   rect->right = point.x + client_rect.right - client_rect.left;
   rect->bottom = point.y + client_rect.bottom - client_rect.top;
-
-  return !impl->inhibit_configure;
 }
 
 cairo_region_t *
diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h
index d37866bcf3..684a689d6b 100644
--- a/gdk/win32/gdkprivate-win32.h
+++ b/gdk/win32/gdkprivate-win32.h
@@ -409,15 +409,13 @@ GdkDisplay *_gdk_win32_display_open (const char *display_name);
 void _gdk_win32_append_event (GdkEvent *event);
 
 
-guint32 _gdk_win32_keymap_get_decimal_mark (GdkWin32Keymap *keymap);
+guint32  _gdk_win32_keymap_get_decimal_mark      (GdkWin32Keymap *keymap);
 
 void     _gdk_win32_surface_handle_aerosnap      (GdkSurface            *window,
                                                   GdkWin32AeroSnapCombo combo);
 
-gboolean _gdk_win32_get_window_rect             (GdkSurface  *window,
-                                                 RECT       *rect);
-void     _gdk_win32_do_emit_configure_event     (GdkSurface  *window,
-                                                 RECT        rect);
+void     _gdk_win32_get_window_rect              (GdkSurface  *window,
+                                                  RECT       *rect);
 void      gdk_win32_surface_do_move_resize_drag  (GdkSurface  *window,
                                                   int         x,
                                                   int         y);
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index 91a1d2f135..6b7f612c5e 100644
--- a/gdk/win32/gdksurface-win32.c
+++ b/gdk/win32/gdksurface-win32.c
@@ -3836,8 +3836,7 @@ gdk_win32_surface_do_move_resize_drag (GdkSurface *window,
   impl = GDK_WIN32_SURFACE (window);
   context = &impl->drag_move_resize_context;
 
-  if (!_gdk_win32_get_window_rect (window, &rect))
-    return;
+  _gdk_win32_get_window_rect (window, &rect);
 
   new_rect = context->start_rect;
   diffx = (x - context->start_root_x) * impl->surface_scale;
diff --git a/gdk/win32/gdksurface-win32.h b/gdk/win32/gdksurface-win32.h
index 2e29427a4f..7288314ec1 100644
--- a/gdk/win32/gdksurface-win32.h
+++ b/gdk/win32/gdksurface-win32.h
@@ -275,7 +275,6 @@ struct _GdkWin32Surface
    * We don't actually set shadow to 0, we just set this bit.
    */
   guint zero_shadow : 1;
-  guint inhibit_configure : 1;
 
   /* If TRUE, the @temp_styles is set to the styles that were temporarily
    * added to this window.


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