win32: 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:35:28 -04:00
parent 0d82fcf76f
commit 618891a41a

View File

@ -1730,13 +1730,10 @@ gdk_surface_win32_get_device_state (GdkSurface *window,
double *y,
GdkModifierType *mask)
{
GdkSurface *child;
_gdk_device_win32_query_state (device, window, NULL, x, y, mask);
g_return_val_if_fail (window == NULL || GDK_IS_SURFACE (window), FALSE);
return *x >= 0 && *y >= 0 && *x < window->width && *y < window->height;
_gdk_device_win32_query_state (device, window, &child, x, y, mask);
return (child != NULL);
}
static void