[gtk/wip/matthiasc/popup2] gdk: Stop using gdk_device_get_surface_at_position



commit 72451a103813f144a8d868d95e81721c1efa3935
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Mar 25 20:36:45 2019 -0400

    gdk: Stop using gdk_device_get_surface_at_position
    
    We should always use the double variant.

 gdk/wayland/gdksurface-wayland.c   | 5 ++---
 gdk/win32/gdkdevicemanager-win32.c | 6 +++---
 2 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c
index 5751e4ddbe..943b40d85c 100644
--- a/gdk/wayland/gdksurface-wayland.c
+++ b/gdk/wayland/gdksurface-wayland.c
@@ -2423,15 +2423,14 @@ gdk_wayland_surface_map (GdkSurface *surface)
                     GDK_SURFACE_IMPL_WAYLAND (attached_grab_surface->impl);
                   grab_device = gdk_seat_get_pointer (attached_impl->grab_input_seat);
                   transient_for =
-                    gdk_device_get_surface_at_position (grab_device,
-                                                       NULL, NULL);
+                    gdk_device_get_surface_at_position_double (grab_device, NULL, NULL);
                 }
             }
           else
             {
               grab_device = gdk_seat_get_pointer (impl->grab_input_seat);
               transient_for =
-                gdk_device_get_surface_at_position (grab_device, NULL, NULL);
+                gdk_device_get_surface_at_position_double (grab_device, NULL, NULL);
             }
 
           if (transient_for)
diff --git a/gdk/win32/gdkdevicemanager-win32.c b/gdk/win32/gdkdevicemanager-win32.c
index d40cc96b61..a7043b40b4 100644
--- a/gdk/win32/gdkdevicemanager-win32.c
+++ b/gdk/win32/gdkdevicemanager-win32.c
@@ -888,7 +888,7 @@ gdk_input_other_event (GdkDisplay *display,
   PACKET packet;
   gint root_x, root_y;
   gint num_axes;
-  gint x, y;
+  double x, y;
   guint translated_buttons, button_diff, button_mask;
   /* Translation from tablet button state to GDK button state for
    * buttons 1-3 - swap button 2 and 3.
@@ -902,13 +902,13 @@ gdk_input_other_event (GdkDisplay *display,
     }
 
   device_manager = GDK_DEVICE_MANAGER_WIN32 (_gdk_device_manager);
-  window = gdk_device_get_surface_at_position (device_manager->core_pointer, &x, &y);
+  window = gdk_device_get_surface_at_position_double (device_manager->core_pointer, &x, &y);
 
   if (window)
     g_object_ref (window);
 
   GDK_NOTE (EVENTS_OR_INPUT,
-           g_print ("gdk_input_other_event: window=%p %+d%+d\n",
+           g_print ("gdk_input_other_event: window=%p %+g%+g\n",
                window ? GDK_SURFACE_HWND (window) : NULL, x, y));
 
   if (msg->message == WT_PACKET || msg->message == WT_CSRCHANGE)


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