UI: don't change mouse cursor while it's grabbed

The paint cursor was continuously set which meant hiding the cursor
while interacting with buttons would immediately show it again.

This exposed cursor warping.
This commit is contained in:
Campbell Barton 2022-12-16 17:22:09 +11:00
parent 8b2afe93b4
commit f2945f3895
Notes: blender-bot 2023-02-14 09:38:57 +01:00
Referenced by issue #103596, Blender 3.5: Cursor warping usable on windows remote desktop (RDP)
1 changed files with 5 additions and 0 deletions

View File

@ -1400,6 +1400,11 @@ static void paint_cursor_sculpt_session_update_and_init(PaintCursorContext *pcon
static void paint_update_mouse_cursor(PaintCursorContext *pcontext)
{
if (pcontext->win->grabcursor != 0) {
/* Don't set the cursor while it's grabbed, since this will show the cursor when interacting
* with the UI (dragging a number button for e.g.), see: T102792. */
return;
}
WM_cursor_set(pcontext->win, WM_CURSOR_PAINT);
}