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.
This commit is contained in:
Campbell Barton 2021-03-14 18:00:15 +11:00
parent 15d728531a
commit d2f4fc8275
2 changed files with 4 additions and 5 deletions

View File

@ -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;

View File

@ -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;
}