Cleanup: Reduce context usage in UI functions
Part of https://developer.blender.org/T74429. There's a chance that this causes some issues becaue in some cases we change from getting the window from context to getting it from somewhere else.
This commit is contained in:
@@ -125,7 +125,9 @@ static int datadropper_init(bContext *C, wmOperator *op)
|
||||
|
||||
static void datadropper_exit(bContext *C, wmOperator *op)
|
||||
{
|
||||
WM_cursor_modal_restore(CTX_wm_window(C));
|
||||
wmWindow *win = CTX_wm_window(C);
|
||||
|
||||
WM_cursor_modal_restore(win);
|
||||
|
||||
if (op->customdata) {
|
||||
DataDropper *ddr = (DataDropper *)op->customdata;
|
||||
@@ -139,7 +141,7 @@ static void datadropper_exit(bContext *C, wmOperator *op)
|
||||
op->customdata = NULL;
|
||||
}
|
||||
|
||||
WM_event_add_mousemove(C);
|
||||
WM_event_add_mousemove(win);
|
||||
}
|
||||
|
||||
/* *** datadropper id helper functions *** */
|
||||
|
||||
Reference in New Issue
Block a user