From 6f418a3441170ec993709800cb58a60da9676f28 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 21 Feb 2023 08:30:28 +0200 Subject: [macOS] Fix Input.warp_mouse shifted by one screen pixel. --- platform/macos/display_server_macos.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm index 14778b5f03..e8eb5b419b 100644 --- a/platform/macos/display_server_macos.mm +++ b/platform/macos/display_server_macos.mm @@ -2024,7 +2024,7 @@ void DisplayServerMacOS::warp_mouse(const Point2i &p_position) { // Local point in window coords. const NSRect contentRect = [wd.window_view frame]; const float scale = screen_get_max_scale(); - NSRect pointInWindowRect = NSMakeRect(p_position.x / scale, contentRect.size.height - (p_position.y / scale - 1), 0, 0); + NSRect pointInWindowRect = NSMakeRect(p_position.x / scale, contentRect.size.height - (p_position.y / scale), scale, scale); NSPoint pointOnScreen = [[wd.window_view window] convertRectToScreen:pointInWindowRect].origin; // Point in scren coords. -- cgit v1.2.3