forked from AuroraMiddleware/gtk
x11: Fix return value of get_device_state
We need to look a the position, not the child surface.
This commit is contained in:
parent
62ed769e74
commit
cf257e6676
@ -2659,19 +2659,18 @@ gdk_x11_surface_get_frame_extents (GdkSurface *surface,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gdk_x11_surface_get_device_state (GdkSurface *surface,
|
gdk_x11_surface_get_device_state (GdkSurface *surface,
|
||||||
GdkDevice *device,
|
GdkDevice *device,
|
||||||
double *x,
|
double *x,
|
||||||
double *y,
|
double *y,
|
||||||
GdkModifierType *mask)
|
GdkModifierType *mask)
|
||||||
{
|
{
|
||||||
GdkSurface *child;
|
|
||||||
|
|
||||||
if (GDK_SURFACE_DESTROYED (surface))
|
if (GDK_SURFACE_DESTROYED (surface))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
gdk_x11_device_xi2_query_state (device, surface, &child, x, y, mask);
|
gdk_x11_device_xi2_query_state (device, surface, NULL, x, y, mask);
|
||||||
return child != NULL;
|
|
||||||
|
return *x >= 0 && *y >= 0 && *x < surface->width && *y < surface->height;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user