diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-06-23 10:51:01 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2021-06-23 10:51:01 +0300 |
commit | f7797bf1b347f7a2eceaaad68e94fc87c3936850 (patch) | |
tree | 7872e436058dae26bc274b16de2fae7e68ee92da | |
parent | 277db14b647d3184b341a359020c0acc4549afaf (diff) |
[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 { |