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:
2020-03-06 16:22:28 +01:00
parent b242cc6792
commit d5572eacc5
41 changed files with 272 additions and 270 deletions

View File

@@ -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 *** */