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:
authorCampbell Barton <ideasman42@gmail.com>2021-03-14 10:00:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-14 10:00:15 +0300
commitd2f4fc8275d4df6e585815757c69c762412bfa65 (patch)
tree2ddcd1123721cb39268a7cdc512dc604336b0655 /source/blender/windowmanager/intern
parent15d728531a333da6bbe921b0f200684cbac3eac0 (diff)
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.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm.c5
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c4
2 files changed, 4 insertions, 5 deletions
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;
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 6cc9a4c9b64..1b4908224cc 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -1773,10 +1773,6 @@ void WM_keyconfig_update(wmWindowManager *wm)
{
bool compat_update = false;
- if (G.background) {
- return;
- }
-
if (wm_keymap_update_flag == 0) {
return;
}