From d6392c90359320fbdabacd11ca55c7024d16ea50 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 26 Aug 2020 16:24:57 -0400 Subject: [PATCH] broadway: Fix return value of get_device_state We need to look a the position, not the child surface. --- gdk/broadway/gdksurface-broadway.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c index 50769c7155..bb932ee17f 100644 --- a/gdk/broadway/gdksurface-broadway.c +++ b/gdk/broadway/gdksurface-broadway.c @@ -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