x11: Stop using _gdk_device_query_state

Directly use the backend implementation.
This commit is contained in:
Matthias Clasen 2020-08-26 15:31:07 -04:00 committed by Ahmed Eldemery
parent 028644d0ad
commit 7d9bc01797
3 changed files with 15 additions and 9 deletions

View File

@ -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

View File

@ -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,

View File

@ -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)
{