[gtk/present-toplevel-2: 3/4] win32: Fix up query_state



commit 848e47e96cc752e77ddc8a38b38f6418635562d1
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Mar 12 07:38:30 2020 -0400

    win32: Fix up query_state

 gdk/win32/gdkdevice-win32.c  | 22 ++++------------------
 gdk/win32/gdkdevice-wintab.c | 16 ++++------------
 2 files changed, 8 insertions(+), 30 deletions(-)
---
diff --git a/gdk/win32/gdkdevice-win32.c b/gdk/win32/gdkdevice-win32.c
index 573eb8ce10..569e31f499 100644
--- a/gdk/win32/gdkdevice-win32.c
+++ b/gdk/win32/gdkdevice-win32.c
@@ -92,12 +92,10 @@ get_current_mask (void)
 
 static void
 gdk_device_win32_query_state (GdkDevice        *device,
-                              GdkSurface        *window,
-                              GdkSurface       **child_window,
-                              gdouble          *root_x,
-                              gdouble          *root_y,
-                              gdouble          *win_x,
-                              gdouble          *win_y,
+                              GdkSurface       *window,
+                              GdkSurface      **child_window,
+                              double           *win_x,
+                              double           *win_y,
                               GdkModifierType  *mask)
 {
   POINT point;
@@ -119,12 +117,6 @@ gdk_device_win32_query_state (GdkDevice        *device,
 
   GetCursorPos (&point);
 
-  if (root_x)
-    *root_x = point.x / scale;
-
-  if (root_y)
-    *root_y = point.y / scale;
-
   if (hwnd)
     ScreenToClient (hwnd, &point);
 
@@ -141,12 +133,6 @@ gdk_device_win32_query_state (GdkDevice        *device,
 
       if (win_y)
         *win_y += _gdk_offset_y;
-
-      if (root_x)
-        *root_x += _gdk_offset_x;
-
-      if (root_y)
-        *root_y += _gdk_offset_y;
     }
 
   if (hwnd && child_window)
diff --git a/gdk/win32/gdkdevice-wintab.c b/gdk/win32/gdkdevice-wintab.c
index 08ca21ccf6..2823a16406 100644
--- a/gdk/win32/gdkdevice-wintab.c
+++ b/gdk/win32/gdkdevice-wintab.c
@@ -101,12 +101,10 @@ gdk_device_wintab_set_surface_cursor (GdkDevice *device,
 
 static void
 gdk_device_wintab_query_state (GdkDevice        *device,
-                               GdkSurface        *window,
-                               GdkSurface       **child_window,
-                               gdouble          *root_x,
-                               gdouble          *root_y,
-                               gdouble          *win_x,
-                               gdouble          *win_y,
+                               GdkSurface       *window,
+                               GdkSurface      **child_window,
+                               double           *win_x,
+                               double           *win_y,
                                GdkModifierType  *mask)
 {
   GdkDeviceWintab *device_wintab;
@@ -130,12 +128,6 @@ gdk_device_wintab_query_state (GdkDevice        *device,
 
   GetCursorPos (&point);
 
-  if (root_x)
-    *root_x = point.x / scale;
-
-  if (root_y)
-    *root_y = point.y / scale;
-
   if (hwnd)
     ScreenToClient (hwnd, &point);
 


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