diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-26 08:20:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-26 08:20:34 +0300 |
commit | 4063c7062a325b611a4a74d42198d06dc22cc26a (patch) | |
tree | be26c21ab316cf4f69f98acca19372ae2fce9ad8 /source/blender | |
parent | 3d904d7650c0a74e494f3ea94b0df3e10292812a (diff) | |
parent | 81f2e68e208215a45d426052d92ed2064c7d017c (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 5f69f928eb5..d8feeb24d86 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2398,19 +2398,24 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) if ((event->val == KM_RELEASE) && (win->eventstate->prevval == KM_PRESS) && - (win->eventstate->check_click == true) && - ((abs(event->x - win->eventstate->prevclickx)) <= WM_EVENT_CLICK_WIGGLE_ROOM && - (abs(event->y - win->eventstate->prevclicky)) <= WM_EVENT_CLICK_WIGGLE_ROOM)) + (win->eventstate->check_click == true)) { - event->val = KM_CLICK; - - if (G.debug & (G_DEBUG_HANDLERS)) { - printf("%s: handling CLICK\n", __func__); - } + if ((abs(event->x - win->eventstate->prevclickx)) <= WM_EVENT_CLICK_WIGGLE_ROOM && + (abs(event->y - win->eventstate->prevclicky)) <= WM_EVENT_CLICK_WIGGLE_ROOM) + { + event->val = KM_CLICK; - action |= wm_handlers_do_intern(C, event, handlers); + if (G.debug & (G_DEBUG_HANDLERS)) { + printf("%s: handling CLICK\n", __func__); + } - event->val = KM_RELEASE; + action |= wm_handlers_do_intern(C, event, handlers); + + event->val = KM_RELEASE; + } + else { + win->eventstate->check_click = 0; + } } else if (event->val == KM_DBL_CLICK) { event->val = KM_PRESS; |