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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-25 11:51:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-25 11:51:05 +0300
commit9812943931b06a078945820abff381dfe4a020cf (patch)
tree9627b836801c4be575eb2b9f90a9393b429bc37e /source
parente31b8303ed17f19521acb90c5dd6c58ade807821 (diff)
WM: check modal handlers for keymap lookups
Keep in sync with 2.8x
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 39dd26339eb..6a5b638437e 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -1190,8 +1190,14 @@ static wmKeyMapItem *wm_keymap_item_find_props(
wmKeyMapItem *found = NULL;
/* look into multiple handler lists to find the item */
- if (win)
- found = wm_keymap_item_find_handlers(C, &win->handlers, opname, opcontext, properties, is_strict, is_hotkey, r_keymap);
+ if (win) {
+ found = wm_keymap_item_find_handlers(
+ C, &win->modalhandlers, opname, opcontext, properties, is_strict, is_hotkey, r_keymap);
+ if (found == NULL) {
+ found = wm_keymap_item_find_handlers(
+ C, &win->handlers, opname, opcontext, properties, is_strict, is_hotkey, r_keymap);
+ }
+ }
if (sa && found == NULL)
found = wm_keymap_item_find_handlers(C, &sa->handlers, opname, opcontext, properties, is_strict, is_hotkey, r_keymap);