From 5ff9b52214dad9cb0239704ef9ab4f6b85cc7841 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Wed, 23 Jun 2021 10:51:01 +0300 Subject: [PATCH] [macOS] Fix custom mouse cursor not set after mouse mode change. (cherry picked from commit f7797bf1b347f7a2eceaaad68e94fc87c3936850) --- platform/osx/os_osx.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 3e425c08978..1505a6063bd 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -3295,6 +3295,12 @@ void OS_OSX::set_mouse_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 = OS::CURSOR_MAX; + set_cursor_shape(p_shape); + } } OS::MouseMode OS_OSX::get_mouse_mode() const {