From 49c62e8e164c67792b644256f954ce201fd2350b Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Sun, 8 Oct 2023 22:18:53 +0200 Subject: [PATCH] Fix #111666: Hide Mouse in Redo Panel Inputs When grabbing cursor with "hide" option then also hide the mouse cursor, and show again when done. Pull Request: https://projects.blender.org/blender/blender/pulls/113428 --- source/blender/windowmanager/intern/wm_cursors.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/windowmanager/intern/wm_cursors.cc b/source/blender/windowmanager/intern/wm_cursors.cc index d03a96a18f2..5e6d6754cee 100644 --- a/source/blender/windowmanager/intern/wm_cursors.cc +++ b/source/blender/windowmanager/intern/wm_cursors.cc @@ -271,6 +271,9 @@ void WM_cursor_grab_enable(wmWindow *win, if ((G.debug & G_DEBUG) == 0) { if (win->ghostwin) { + if (hide) { + WM_cursor_modal_set(win, WM_CURSOR_NONE); + } if (win->eventstate->tablet.is_motion_absolute == false) { GHOST_SetCursorGrab(static_cast(win->ghostwin), mode, @@ -288,6 +291,7 @@ void WM_cursor_grab_disable(wmWindow *win, const int mouse_ungrab_xy[2]) { if ((G.debug & G_DEBUG) == 0) { if (win && win->ghostwin) { + WM_cursor_modal_restore(win); if (mouse_ungrab_xy) { int mouse_xy[2] = {mouse_ungrab_xy[0], mouse_ungrab_xy[1]}; wm_cursor_position_to_ghost_screen_coords(win, &mouse_xy[0], &mouse_xy[1]);