macos: fix calculation of mouse position

This fixes the calculation of the position of the pointer over the surface
which was incorrectly providing negative values.
This commit is contained in:
Christian Hergert 2020-11-04 18:02:04 -08:00
parent b0e0af1838
commit c31c3848df

View File

@ -256,7 +256,7 @@ gdk_macos_surface_get_device_state (GdkSurface *surface,
| _gdk_macos_display_get_current_mouse_modifiers (GDK_MACOS_DISPLAY (display)); | _gdk_macos_display_get_current_mouse_modifiers (GDK_MACOS_DISPLAY (display));
*x = point.x; *x = point.x;
*y = point.y - surface->height; *y = surface->height - point.y;
return *x >= 0 && *y >= 0 && *x < surface->width && *y < surface->height; return *x >= 0 && *y >= 0 && *x < surface->width && *y < surface->height;
} }