Commit: fb1915d87090a120233ad58b59b953e674e21208
Author: Campbell Barton
Date:   Fri Jun 8 14:09:45 2018 +0200
Branches: master
https://developer.blender.org/rBfb1915d87090a120233ad58b59b953e674e21208

Prevent wheel causing spurious click/drag events

===================================================================

M       source/blender/windowmanager/intern/wm_event_system.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_event_system.c 
b/source/blender/windowmanager/intern/wm_event_system.c
index b9feb4cba09..8693fd401a8 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2284,8 +2284,11 @@ static int wm_handlers_do(bContext *C, wmEvent *event, 
ListBase *handlers)
 
                        if (win != NULL) {
                                if (event->val == KM_PRESS) {
-                                       win->eventstate->check_click = true;
-                                       win->eventstate->check_drag = true;
+                                       /* Ensure the types match to prevent 
mouse wheel from triggering drag/clicks. */
+                                       if (event->type == 
win->eventstate->prevtype) {
+                                               win->eventstate->check_click = 
true;
+                                               win->eventstate->check_drag = 
true;
+                                       }
                                }
                                else if (event->val == KM_RELEASE) {
                                        win->eventstate->check_drag = false;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to