Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-03-10 08:23:24 +0300
committerCampbell Barton <campbell@blender.org>2022-03-10 13:26:15 +0300
commit1f1dcf41d51a03150ee38f220c590f8715b11e88 (patch)
tree3165d4f63ab22a6a829c27044bac6b1c7509d93c /source/blender/windowmanager/intern/wm_window.c
parentef6d108b759711102a04ac5f9ab9dafffae473bc (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_window.c')
-rw-r--r--source/blender/windowmanager/intern/wm_window.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 6c90e0603a5..d6f85e3795e 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -209,6 +209,9 @@ void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win)
if (win->eventstate) {
MEM_freeN(win->eventstate);
}
+ if (win->event_last_handled) {
+ MEM_freeN(win->event_last_handled);
+ }
if (win->cursor_keymap_status) {
MEM_freeN(win->cursor_keymap_status);