diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-07 21:37:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-07 21:39:17 +0300 |
commit | 8f49299134b504a59558aad8e66a81ae3c6c9748 (patch) | |
tree | 75ad891dd7144cb77124c92c7c8a57403c6a702c /source/blender | |
parent | cfc1ddeff71570d702fc0c1c79d36249086849b9 (diff) |
WM: fix drag events applying after release
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 11 |
1 files changed, 8 insertions, 3 deletions
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) { |