diff options
author | Campbell Barton <campbell@blender.org> | 2022-02-28 07:16:16 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-02-28 07:31:01 +0300 |
commit | db4313610cab18933c1b1b1348720ea241b9d91e (patch) | |
tree | c9d733ef988928d0344cfd4debd4942f6b2d6aea /source/blender/windowmanager/WM_types.h | |
parent | 63891f9dad930f3d766d8586b909ca59ba089f3e (diff) |
Event System: drag events now use modifier state on drag start
Now drag & tweak can have modifier keys to be released while dragging.
without this, modifier keys needs to be held which is more noticeable
for tablet input or whenever the drag threshold is set to a large value.
Resolves T89989.
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 2f431bcd208..e9f12287d29 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -510,6 +510,10 @@ typedef struct wmGesture { struct wmGesture *next, *prev; /** #wmEvent.type */ int event_type; + /** #wmEvent.modifier */ + uint8_t event_modifier; + /** #wmEvent.keymodifier */ + short event_keymodifier; /** Gesture type define. */ int type; /** bounds of region to draw gesture within. */ @@ -628,6 +632,11 @@ typedef struct wmEvent { double prev_click_time; /** The location when the key is pressed (used to enforce drag thresholds). */ int prev_click_xy[2]; + /** The `modifier` at the point of the click action. */ + uint8_t prev_click_modifier; + /** The `keymodifier` at the point of the click action. */ + short prev_click_keymodifier; + /** * The previous value of #wmEvent.xy, * Unlike other previous state variables, this is set on any mouse motion. |