diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-08-26 16:24:57 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-08-26 17:56:41 -0400 |
commit | c4c155d698c822816279554bf505feaa7339d9cf (patch) | |
tree | d913e2543a74540f8b76c12194fd4f4bc1d06b0e | |
parent | b9016229c1018bfc4142fe70185bbfaf72da4844 (diff) | |
download | gtk+-c4c155d698c822816279554bf505feaa7339d9cf.tar.gz |
broadway: Fix return value of get_device_state
We need to look a the position, not the child surface.
-rw-r--r-- | gdk/broadway/gdksurface-broadway.c | 7 |
1 files 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 |