diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-08-26 16:04:25 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-08-26 17:56:41 -0400 |
commit | 8c9e1e7444b958c66445a84787abbb039af4fa13 (patch) | |
tree | ee24a5b0cdccab04ed524845d20e27ed15c5d4a1 | |
parent | 73d81d7178f34cee9b12e48b2581977d10eb52f7 (diff) | |
download | gtk+-8c9e1e7444b958c66445a84787abbb039af4fa13.tar.gz |
wayland: Stop using the query_state vfunc
Just call the backend implementation directly.
-rw-r--r-- | gdk/wayland/gdkdevice-wayland-private.h | 14 | ||||
-rw-r--r-- | gdk/wayland/gdkdevice-wayland.c | 4 | ||||
-rw-r--r-- | gdk/wayland/gdksurface-wayland.c | 5 |
3 files changed, 18 insertions, 5 deletions
diff --git a/gdk/wayland/gdkdevice-wayland-private.h b/gdk/wayland/gdkdevice-wayland-private.h new file mode 100644 index 0000000000..a1942fbe38 --- /dev/null +++ b/gdk/wayland/gdkdevice-wayland-private.h @@ -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 diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 4436269217..f55a593ba4 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -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; diff --git a/gdk/wayland/gdksurface-wayland.c b/gdk/wayland/gdksurface-wayland.c index a444a4ee44..b6ff57a5b0 100644 --- a/gdk/wayland/gdksurface-wayland.c +++ b/gdk/wayland/gdksurface-wayland.c @@ -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); } |