diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-21 19:53:26 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-21 19:59:33 +0300 |
commit | bcc37dd9604266434369ee0d0985e2b33910355d (patch) | |
tree | 016522f82ba2760a57fba38b7aa6eae378956ab1 /source/blender/makesdna/DNA_windowmanager_types.h | |
parent | fd0333afab93878630c55888029c3ea9d27323e6 (diff) | |
parent | c1f622e63e387c70bd2577e87260b8df9a496d1d (diff) |
Merge branch 'master' into refactor-mesh-selection-generic
Diffstat (limited to 'source/blender/makesdna/DNA_windowmanager_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_windowmanager_types.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index 1c71129a3c7..d57cca0b055 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -307,7 +307,22 @@ typedef struct wmWindow { */ short pie_event_type_last; - /** Storage for event system. */ + /** + * Storage for event system. + * + * For the most part this is storage for `wmEvent.xy` & `wmEvent.modifiers`. + * newly added key/button events copy the cursor location and modifier state stored here. + * + * It's also convenient at times to be able to pass this as if it's a regular event. + * + * - This is not simply the current event being handled. + * The type and value is always set to the last press/release events + * otherwise cursor motion would always clear these values. + * + * - The value of `eventstate->modifiers` is set from the last pressed/released modifier key. + * This has the down side that the modifier value will be incorrect if users hold both + * left/right modifiers then release one. See note in #wm_event_add_ghostevent for details. + */ struct wmEvent *eventstate; /** Keep the last handled event in `event_queue` here (owned and must be freed). */ struct wmEvent *event_last_handled; |