forked from AuroraMiddleware/gtk
wayland: Fix return value of get_device_state
We need to look a the position, not the child surface.
This commit is contained in:
parent
f854c2850f
commit
e6d4555b34
@ -3170,21 +3170,12 @@ gdk_wayland_surface_get_device_state (GdkSurface *surface,
|
|||||||
double *y,
|
double *y,
|
||||||
GdkModifierType *mask)
|
GdkModifierType *mask)
|
||||||
{
|
{
|
||||||
gboolean return_val;
|
if (GDK_SURFACE_DESTROYED (surface))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
g_return_val_if_fail (surface == NULL || GDK_IS_SURFACE (surface), FALSE);
|
gdk_wayland_device_query_state (device, surface, NULL, x, y, mask);
|
||||||
|
|
||||||
return_val = TRUE;
|
return *x >= 0 && *y >= 0 && *x < surface->width && *y < surface->height;
|
||||||
|
|
||||||
if (!GDK_SURFACE_DESTROYED (surface))
|
|
||||||
{
|
|
||||||
GdkSurface *child;
|
|
||||||
|
|
||||||
gdk_wayland_device_query_state (device, surface, &child, x, y, mask);
|
|
||||||
return_val = (child != NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
return return_val;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user