diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-01-10 07:10:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-01-10 07:10:13 +0300 |
commit | 62c60385315f207c3e744adc8787e569ee0d3204 (patch) | |
tree | 08440531aa8200128e640526da1fd9db58d988fb /source | |
parent | 7eaed14fae865826ed4dc8053c42cb929f71dce7 (diff) |
Docs: explain logic behind wm_event_modalkeymap
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 98ed908377c..0041143f93e 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2073,7 +2073,16 @@ static wmKeyMapItem *wm_eventmatch_modal_keymap_items(const wmKeyMap *keymap, return NULL; } -/* operator exists */ +/** + * This function prepares events for use with #wmOperatorType.modal by: + * + * - Matching keymap items with the operators modal keymap. + * - Converting double click events into press events, + * allowing them to be restored when the events aren't handled. + * + * This is done since we only want to use double click events to match key-map items, + * allowing modal functions to check for press/release events without having to interpret them. + */ static void wm_event_modalkeymap(const bContext *C, wmOperator *op, wmEvent *event, |