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/windowmanager/intern/wm_files.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/windowmanager/intern/wm_files.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 5bf5780b93f..4ff96b82fd2 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -246,7 +246,9 @@ static void wm_window_substitute_old(wmWindowManager *oldwm, oldwin->gpuctx = NULL; win->eventstate = oldwin->eventstate; + win->event_last_handled = oldwin->event_last_handled; oldwin->eventstate = NULL; + oldwin->event_last_handled = NULL; /* Ensure proper screen re-scaling. */ win->sizex = oldwin->sizex; |