diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-10 08:23:24 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-10 13:26:15 +0300 |
commit | 1f1dcf41d51a03150ee38f220c590f8715b11e88 (patch) | |
tree | 3165d4f63ab22a6a829c27044bac6b1c7509d93c /source/blender/editors/interface/interface_region_popup.c | |
parent | ef6d108b759711102a04ac5f9ab9dafffae473bc (diff) |
Event System: key-press while dragging now activates drag first
When dragging with a large threshold (using a tablet for example),
it's possible to press another key before the drag threshold is reached.
So tweaking then pressing X would show the delete popup instead of
transforming along the X-axis.
Now key presses while dragging cause the drag event to be evaluated
before the key press.
Note that to properly base the mouse-move event on the previous
state the last handled event is now stored in the window.
Without this the inserted mouse-move event may contain invalid values
from the next event (it's modifier state or other `prev_*` values).
Requested by @JulienKaspar.
Diffstat (limited to 'source/blender/editors/interface/interface_region_popup.c')
-rw-r--r-- | source/blender/editors/interface/interface_region_popup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_region_popup.c b/source/blender/editors/interface/interface_region_popup.c index c37d8ec7a2b..2f2556225b5 100644 --- a/source/blender/editors/interface/interface_region_popup.c +++ b/source/blender/editors/interface/interface_region_popup.c @@ -557,6 +557,7 @@ uiBlock *ui_popup_block_refresh(bContext *C, #ifdef DEBUG wmEvent *event_back = window->eventstate; + wmEvent *event_last_back = window->event_last_handled; #endif /* create ui block */ @@ -740,6 +741,7 @@ uiBlock *ui_popup_block_refresh(bContext *C, #ifdef DEBUG window->eventstate = event_back; + window->event_last_handled = event_last_back; #endif return block; |