summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-08-26 15:31:07 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-08-26 15:31:07 -0400
commit62a4a356c9eb069bfaa512cdcda9c35dde7f70e1 (patch)
treefd0423993d237d854039d294e9422a0d7e048c4f
parent1e4c6cde100f4a3052b340cc1f40eaa85d58fd60 (diff)
downloadgtk+-62a4a356c9eb069bfaa512cdcda9c35dde7f70e1.tar.gz
x11: Stop using _gdk_device_query_state
Directly use the backend implementation.
-rw-r--r--gdk/x11/gdkdevice-xi2-private.h10
-rw-r--r--gdk/x11/gdkdevice-xi2.c9
-rw-r--r--gdk/x11/gdkdrag-x11.c5
3 files changed, 15 insertions, 9 deletions
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)
{