diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-23 10:56:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-23 10:56:28 +0200 |
commit | 659178e85fed5a7ee80d76329a977ac3943c7d77 (patch) | |
tree | 7872e436058dae26bc274b16de2fae7e68ee92da | |
parent | 277db14b647d3184b341a359020c0acc4549afaf (diff) | |
parent | f7797bf1b347f7a2eceaaad68e94fc87c3936850 (diff) |
Merge pull request #49848 from bruvzg/ccur_macos_fix
[macOS] Fix custom mouse cursor not set after mouse mode change.
-rw-r--r-- | platform/osx/display_server_osx.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/osx/display_server_osx.mm b/platform/osx/display_server_osx.mm index ec51ec78d3..4a672a4b17 100644 --- a/platform/osx/display_server_osx.mm +++ b/platform/osx/display_server_osx.mm @@ -2120,6 +2120,12 @@ void DisplayServerOSX::mouse_set_mode(MouseMode p_mode) { ignore_warp = true; warp_events.clear(); mouse_mode = p_mode; + + if (mouse_mode == MOUSE_MODE_VISIBLE || mouse_mode == MOUSE_MODE_CONFINED) { + CursorShape p_shape = cursor_shape; + cursor_shape = DisplayServer::CURSOR_MAX; + cursor_set_shape(p_shape); + } } DisplayServer::MouseMode DisplayServerOSX::mouse_get_mode() const { |