mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
win32: Fix return value of get_device_state
We need to look a the position, not the child surface.
This commit is contained in:
parent
0d82fcf76f
commit
618891a41a
@ -1724,19 +1724,16 @@ gdk_win32_surface_get_root_coords (GdkSurface *window,
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gdk_surface_win32_get_device_state (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
double *x,
|
||||
double *y,
|
||||
GdkModifierType *mask)
|
||||
gdk_surface_win32_get_device_state (GdkSurface *window,
|
||||
GdkDevice *device,
|
||||
double *x,
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user