diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-02 13:43:22 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-02 13:47:49 +0300 |
commit | 102644cb8cbb8b21e55643cebe2ed364885023a6 (patch) | |
tree | 1153cebfe1b93aac55f5c4e3c83a9338b605afa0 /source/blender/windowmanager | |
parent | 1747269ea5713f23f57b3a5dbb68f71ef05a0410 (diff) |
Fix releasing modifier keys suppressing drag events
Always use event.prev_click_type since this is never set on key-release,
which could still interrupt dragging (box selecting for example).
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index c6b2e81d121..375cc4e785e 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -3178,7 +3178,7 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) copy_v2_v2_int(event->xy, event->prev_click_xy); event->val = KM_CLICK_DRAG; - event->type = event->prev_type; + event->type = event->prev_click_type; event->modifier = event->prev_click_modifier; event->keymodifier = event->prev_click_keymodifier; event->direction = direction; @@ -3215,7 +3215,7 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) } else if (event->val == KM_RELEASE) { if (win->event_queue_check_drag) { - if ((event->prev_type != event->type) && + if ((event->prev_click_type != event->type) && (ISKEYMODIFIER(event->type) || (event->type == event->prev_click_keymodifier))) { /* Support releasing modifier keys without canceling the drag event, see T89989. * NOTE: this logic is replicated for tweak gestures. */ @@ -3226,7 +3226,7 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) } } - if (event->prev_type == event->type) { + if (event->prev_click_type == event->type) { if (event->val == KM_RELEASE) { if (event->prev_val == KM_PRESS) { |