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/WM_types.h
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/WM_types.h')
-rw-r--r--source/blender/windowmanager/WM_types.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 8934f714c21..9edbafafdd3 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -610,6 +610,11 @@ typedef enum eWM_EventFlag {
* See #KMI_REPEAT_IGNORE for details on how key-map handling uses this.
*/
WM_EVENT_IS_REPEAT = (1 << 1),
+ /**
+ * Mouse-move events may have this flag set to force creating a click-drag event
+ * even when the threshold has not been met.
+ */
+ WM_EVENT_FORCE_DRAG_THRESHOLD = (1 << 2),
} eWM_EventFlag;
typedef struct wmTabletData {