broadway: Stop using the query_state vfunc

Just call the backend implementation directly.
This commit is contained in:
Matthias Clasen 2020-08-26 16:03:31 -04:00
parent 84355ccbff
commit 73d81d7178
3 changed files with 10 additions and 11 deletions

View File

@ -26,12 +26,6 @@
static void gdk_broadway_device_set_surface_cursor (GdkDevice *device,
GdkSurface *surface,
GdkCursor *cursor);
static void gdk_broadway_device_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
double *win_x,
double *win_y,
GdkModifierType *mask);
static GdkGrabStatus gdk_broadway_device_grab (GdkDevice *device,
GdkSurface *surface,
gboolean owner_events,
@ -55,7 +49,6 @@ gdk_broadway_device_class_init (GdkBroadwayDeviceClass *klass)
GdkDeviceClass *device_class = GDK_DEVICE_CLASS (klass);
device_class->set_surface_cursor = gdk_broadway_device_set_surface_cursor;
device_class->query_state = gdk_broadway_device_query_state;
device_class->grab = gdk_broadway_device_grab;
device_class->ungrab = gdk_broadway_device_ungrab;
device_class->surface_at_position = gdk_broadway_device_surface_at_position;
@ -79,7 +72,7 @@ gdk_broadway_device_set_surface_cursor (GdkDevice *device,
{
}
static void
void
gdk_broadway_device_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,

View File

@ -45,6 +45,13 @@ struct _GdkBroadwayDeviceClass
G_GNUC_INTERNAL
GType gdk_broadway_device_get_type (void) G_GNUC_CONST;
void gdk_broadway_device_query_state (GdkDevice *device,
GdkSurface *surface,
GdkSurface **child_surface,
double *win_x,
double *win_y,
GdkModifierType *mask);
G_END_DECLS
#endif /* __GDK_DEVICE_BROADWAY_H__ */

View File

@ -30,6 +30,7 @@
#include "gdkbroadwaydisplay.h"
#include "gdkdeviceprivate.h"
#include "gdkdisplay-broadway.h"
#include "gdkdevice-broadway.h"
#include "gdkdisplay.h"
#include "gdkdragsurfaceprivate.h"
#include "gdkeventsource.h"
@ -756,9 +757,7 @@ gdk_broadway_surface_get_device_state (GdkSurface *surface,
if (GDK_SURFACE_DESTROYED (surface))
return FALSE;
GDK_DEVICE_GET_CLASS (device)->query_state (device, surface,
&child,
x, y, mask);
gdk_broadway_device_query_state (device, surface, &child, x, y, mask);
return child != NULL;
}