Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2020-03-06 18:22:28 +0300
committerJulian Eisel <julian@blender.org>2020-03-06 18:27:13 +0300
commitd5572eacc5958db38ac4a4a32eddb3a2cd24bf68 (patch)
tree5252d8f509dae02bf9c137a1710c073d5bbac592 /source/blender/windowmanager/intern/wm_init_exit.c
parentb242cc67928a6858a835c088e4d3ea8822c83168 (diff)
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.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index b775b16c6df..7a05ef4b849 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -150,11 +150,9 @@ static void wm_init_reports(bContext *C)
BKE_reports_init(reports, RPT_STORE);
}
-static void wm_free_reports(bContext *C)
+static void wm_free_reports(wmWindowManager *wm)
{
- ReportList *reports = CTX_wm_reports(C);
-
- BKE_reports_clear(reports);
+ BKE_reports_clear(&wm->reports);
}
static bool wm_start_with_console = false;
@@ -470,7 +468,7 @@ void wm_exit_schedule_delayed(const bContext *C)
/* Use modal UI handler for now.
* Could add separate WM handlers or so, but probably not worth it. */
WM_event_add_ui_handler(C, &win->modalhandlers, wm_exit_handler, NULL, NULL, 0);
- WM_event_add_mousemove(C); /* ensure handler actually gets called */
+ WM_event_add_mousemove(win); /* ensure handler actually gets called */
}
/**
@@ -558,9 +556,9 @@ void WM_exit_ex(bContext *C, const bool do_python)
ED_preview_free_dbase(); /* frees a Main dbase, before BKE_blender_free! */
- if (C && wm) {
+ if (wm) {
/* Before BKE_blender_free! - since the ListBases get freed there. */
- wm_free_reports(C);
+ wm_free_reports(wm);
}
BKE_sequencer_free_clipboard(); /* sequencer.c */