wayland: Stop using the query_state vfunc

Just call the backend implementation directly.
This commit is contained in:
Matthias Clasen
2020-08-26 16:04:25 -04:00
committed by Ahmed Eldemery
parent d785212706
commit 07ef594be1
3 changed files with 18 additions and 5 deletions

View File

@@ -0,0 +1,14 @@
#ifndef __GDK_DEVICE_WAYLAND_PRIVATE_H__
#define __GDK_DEVICE_WAYLAND_PRIVATE_H__
#include "gdkwaylanddevice.h"
void
gdk_wayland_device_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
double *win_x,
double *win_y,
GdkModifierType *mask);
#endif

View File

@@ -35,6 +35,7 @@
#include "gdkdeviceprivate.h"
#include "gdkdevicepadprivate.h"
#include "gdkdevicetoolprivate.h"
#include "gdkdevice-wayland-private.h"
#include "gdkdropprivate.h"
#include "gdkprimary-wayland.h"
#include "gdkseatprivate.h"
@@ -517,7 +518,7 @@ device_get_modifiers (GdkDevice *device)
return mask;
}
static void
void
gdk_wayland_device_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
@@ -796,7 +797,6 @@ gdk_wayland_device_class_init (GdkWaylandDeviceClass *klass)
GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
device_class->set_surface_cursor = gdk_wayland_device_set_surface_cursor;
device_class->query_state = gdk_wayland_device_query_state;
device_class->grab = gdk_wayland_device_grab;
device_class->ungrab = gdk_wayland_device_ungrab;
device_class->surface_at_position = gdk_wayland_device_surface_at_position;

View File

@@ -36,6 +36,7 @@
#include "gdkseat-wayland.h"
#include "gdksurfaceprivate.h"
#include "gdktoplevelprivate.h"
#include "gdkdevice-wayland-private.h"
#include <wayland/xdg-shell-unstable-v6-client-protocol.h>
@@ -3179,9 +3180,7 @@ gdk_wayland_surface_get_device_state (GdkSurface *surface,
{
GdkSurface *child;
GDK_DEVICE_GET_CLASS (device)->query_state (device, surface,
&child,
x, y, mask);
gdk_wayland_device_query_state (device, surface, &child, x, y, mask);
return_val = (child != NULL);
}