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/makesdna | |
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/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_windowmanager_types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 42c94832a43..ade0fcdb13f 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -294,6 +294,8 @@ typedef struct wmWindow { /** Storage for event system. */ struct wmEvent *eventstate; + /** Keep the last handled event in `event_queue` here (owned and must be freed). */ + struct wmEvent *event_last_handled; /* Input Method Editor data - complex character input (especially for Asian character input) * Currently WIN32 and APPLE, runtime-only data. */ |