From 7d9bc01797f0e96f454640ef47334493ddb5d20a Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 26 Aug 2020 15:31:07 -0400 Subject: [PATCH] x11: Stop using _gdk_device_query_state Directly use the backend implementation. --- gdk/x11/gdkdevice-xi2-private.h | 10 ++++++++++ gdk/x11/gdkdevice-xi2.c | 9 ++------- gdk/x11/gdkdrag-x11.c | 5 +++-- 3 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 gdk/x11/gdkdevice-xi2-private.h diff --git a/gdk/x11/gdkdevice-xi2-private.h b/gdk/x11/gdkdevice-xi2-private.h new file mode 100644 index 0000000000..c9f6bef357 --- /dev/null +++ b/gdk/x11/gdkdevice-xi2-private.h @@ -0,0 +1,10 @@ +#ifndef __GDK_DEVICE_XI2_PRIVATE_H__ +#define __GDK_DEVICE_XI2_PRIVATE_H__ + +void gdk_x11_device_xi2_query_state (GdkDevice *device, + GdkSurface *surface, + GdkSurface **child_surface, + double *win_x, + double *win_y, + GdkModifierType *mask); +#endif diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c index 0a239f2d8a..ca9e813cfb 100644 --- a/gdk/x11/gdkdevice-xi2.c +++ b/gdk/x11/gdkdevice-xi2.c @@ -19,6 +19,7 @@ #include "gdkx11device-xi2.h" #include "gdkdeviceprivate.h" +#include "gdkdevice-xi2-private.h" #include "gdkintl.h" #include "gdkasync.h" @@ -74,12 +75,6 @@ static void gdk_x11_device_xi2_set_property (GObject *object, static void gdk_x11_device_xi2_set_surface_cursor (GdkDevice *device, GdkSurface *surface, GdkCursor *cursor); -static void gdk_x11_device_xi2_query_state (GdkDevice *device, - GdkSurface *surface, - GdkSurface **child_surface, - double *win_x, - double *win_y, - GdkModifierType *mask); static GdkGrabStatus gdk_x11_device_xi2_grab (GdkDevice *device, GdkSurface *surface, @@ -205,7 +200,7 @@ gdk_x11_device_xi2_set_surface_cursor (GdkDevice *device, GDK_SURFACE_XID (surface)); } -static void +void gdk_x11_device_xi2_query_state (GdkDevice *device, GdkSurface *surface, GdkSurface **child_surface, diff --git a/gdk/x11/gdkdrag-x11.c b/gdk/x11/gdkdrag-x11.c index cc6afd9e90..9f6a5f5fdf 100644 --- a/gdk/x11/gdkdrag-x11.c +++ b/gdk/x11/gdkdrag-x11.c @@ -31,6 +31,7 @@ #include "gdkclipboardprivate.h" #include "gdkclipboard-x11.h" #include "gdkdeviceprivate.h" +#include "gdkdevice-xi2-private.h" #include "gdkdisplay-x11.h" #include "gdkdragprivate.h" #include "gdksurfaceprivate.h" @@ -2010,7 +2011,7 @@ _gdk_x11_surface_drag_begin (GdkSurface *surface, precache_target_list (drag); - _gdk_device_query_state (device, surface, NULL, &px, &py, NULL); + gdk_x11_device_xi2_query_state (device, surface, NULL, &px, &py, NULL); gdk_x11_surface_get_root_coords (surface, round (px + dx), @@ -2270,7 +2271,7 @@ gdk_dnd_handle_key_event (GdkDrag *drag, * to query it here. We could use XGetModifierMapping, but * that would be overkill. */ - _gdk_device_query_state (pointer, NULL, NULL, NULL, NULL, &state); + gdk_x11_device_xi2_query_state (pointer, NULL, NULL, NULL, NULL, &state); if (dx != 0 || dy != 0) {