Commit: 8f49299134b504a59558aad8e66a81ae3c6c9748
Author: Campbell Barton
Date: Thu Jun 7 20:37:28 2018 +0200
Branches: master
https://developer.blender.org/rB8f49299134b504a59558aad8e66a81ae3c6c9748
WM: fix drag events applying after release
===================================================================
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 f820a0a1b8d..5974d4fddee 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2252,9 +2252,14 @@ static int wm_handlers_do(bContext *C, wmEvent *event,
ListBase *handlers)
/* eventstate stores if previous event was a KM_PRESS,
in case that
* wasn't handled, the KM_RELEASE will become a
KM_CLICK */
- if (win && event->val == KM_PRESS) {
- win->eventstate->check_click = true;
- win->eventstate->check_drag = true;
+ if (win != NULL) {
+ if (event->val == KM_PRESS) {
+ win->eventstate->check_click = true;
+ win->eventstate->check_drag = true;
+ }
+ else if (event->val == KM_RELEASE) {
+ win->eventstate->check_drag = false;
+ }
}
if (win && win->eventstate->prevtype == event->type) {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs