1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-04 19:21:46 +00:00

Merge pull request #88519 from bruvzg/mac_conf_mode

[macOS] Ignore window decorations in confined mouse mode to match other platforms.
This commit is contained in:
Rémi Verschelde
2024-02-19 00:09:15 +01:00

View File

@@ -2559,7 +2559,7 @@ bool DisplayServerMacOS::update_mouse_wrap(WindowData &p_wd, NSPoint &r_delta, N
}
// Confine mouse position to the window, and update delta.
NSRect frame = [p_wd.window_object frame];
NSRect frame = [p_wd.window_view frame];
NSPoint conf_pos = r_mpos;
conf_pos.x = CLAMP(conf_pos.x + r_delta.x, 0.f, frame.size.width);
conf_pos.y = CLAMP(conf_pos.y - r_delta.y, 0.f, frame.size.height);