Fix T55178: Cursor fails to restore on cancel
574c0fe38f caused complications
restoring the cursor.
Use WM_cursor_modal_set/restore which is intended for operator use,
calling ED_region_cursor_set after an operator runs isn't reliable.
This commit is contained in:
@@ -1958,14 +1958,7 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
|
||||
|
||||
/* remove modal handler, operator itself should have been canceled and freed */
|
||||
if (retval & (OPERATOR_CANCELLED | OPERATOR_FINISHED)) {
|
||||
/* set cursor back to the default for the region */
|
||||
wmWindow *win = CTX_wm_window(C);
|
||||
WM_cursor_grab_disable(win, NULL);
|
||||
/* Causes crash when joining areas: T55166, seems this is not even needed. */
|
||||
#if 0
|
||||
ED_region_cursor_set(win, area, region);
|
||||
#endif
|
||||
|
||||
WM_cursor_grab_disable(CTX_wm_window(C), NULL);
|
||||
|
||||
BLI_remlink(handlers, handler);
|
||||
wm_event_free_handler(handler);
|
||||
|
||||
Reference in New Issue
Block a user