[gtk/wip.win32.fixes: 13/15] GDK-Win32: Some cleanups




commit 81de39ed8bd22cc708ff2c59298286d1b6fa2409
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.

 gdk/win32/gdkevents-win32.c  | 4 +---
 gdk/win32/gdkprivate-win32.h | 2 +-
 gdk/win32/gdksurface-win32.c | 3 +--
 gdk/win32/gdksurface-win32.h | 1 -
 4 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/gdk/win32/gdkevents-win32.c b/gdk/win32/gdkevents-win32.c
index 2be0aac319..c50f91785c 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..de117ccb29 100644
--- a/gdk/win32/gdkprivate-win32.h
+++ b/gdk/win32/gdkprivate-win32.h
@@ -414,7 +414,7 @@ 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,
+void     _gdk_win32_get_window_rect             (GdkSurface  *window,
                                                  RECT       *rect);
 void     _gdk_win32_do_emit_configure_event     (GdkSurface  *window,
                                                  RECT        rect);
diff --git a/gdk/win32/gdksurface-win32.c b/gdk/win32/gdksurface-win32.c
index 9f387d0357..daf51d688a 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]