broadway: Fix return value of get_device_state

We need to look a the position, not the child surface.
This commit is contained in:
Matthias Clasen
2020-08-26 16:24:57 -04:00
committed by Ahmed Eldemery
parent 02631d2b6e
commit d6392c9035

View File

@@ -750,15 +750,14 @@ gdk_broadway_surface_get_device_state (GdkSurface *surface,
double *y,
GdkModifierType *mask)
{
GdkSurface *child;
g_return_val_if_fail (surface == NULL || GDK_IS_SURFACE (surface), FALSE);
if (GDK_SURFACE_DESTROYED (surface))
return FALSE;
gdk_broadway_device_query_state (device, surface, &child, x, y, mask);
return child != NULL;
gdk_broadway_device_query_state (device, surface, NULL, x, y, mask);
return *x >= 0 && *y >= 0 && *x < surface->width && *y < surface->height;
}
static void