diff options
-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 6ebe1671afc..a71202bfa71 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2204,19 +2204,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; |