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>2020-03-11 12:03:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-11 12:09:37 +0300
commitf2c64517b59bb3205f7174687d90d93b24174aac (patch)
tree2987117a9d6a976a2ace7ddccc23aa9fbeece0b7 /source
parentd195deef5cbfe2951dceb2a11959091fbd263440 (diff)
Fix T74607: Modifier key click events ignore mouse wheel
Alt-Wheel would sent Alt-Click event, prompting to switch tools.
Diffstat (limited to 'source')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 8728c887feb..7e78a0224ce 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2915,6 +2915,21 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
}
}
}
+ else if (ISMOUSE_WHEEL(event->type) || ISMOUSE_GESTURE(event->type)) {
+ /* Modifiers which can trigger click event's,
+ * however we don't want this if the mouse wheel has been used, see T74607. */
+ if (wm_action_not_handled(action)) {
+ /* pass */
+ }
+ else {
+ wmWindow *win = CTX_wm_window(C);
+ if (win) {
+ if (ISKEYMODIFIER(win->eventstate->prevtype)) {
+ win->eventstate->check_click = 0;
+ }
+ }
+ }
+ }
return action;
}