From d2f4fc8275d4df6e585815757c69c762412bfa65 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 14 Mar 2021 18:00:15 +1100 Subject: WM: support loading keymaps in background mode While this still isn't done by default on startup, activating a key-config will load it as expected. Needed to perform key-map loading tests in background mode. --- source/blender/windowmanager/intern/wm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender/windowmanager/intern/wm.c') diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index b66544831f1..3f1bbb7a669 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -473,7 +473,10 @@ void WM_keyconfig_init(bContext *C) wm->defaultconf->flag |= KEYCONF_INIT_DEFAULT; } - WM_keyconfig_update_tag(NULL, NULL); + /* Harmless, but no need to update in background mode. */ + if (!G.background) { + WM_keyconfig_update_tag(NULL, NULL); + } WM_keyconfig_update(wm); wm->initialized |= WM_KEYCONFIG_IS_INIT; -- cgit v1.2.3