Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_event_system.cc
| Show First 20 Lines • Show All 2,123 Lines • ▼ Show 20 Lines | else if (handler_base->type == WM_HANDLER_TYPE_UI) { | ||||
| CTX_wm_menu_set(C, menu); | CTX_wm_menu_set(C, menu); | ||||
| } | } | ||||
| } | } | ||||
| wm_event_free_handler(handler_base); | wm_event_free_handler(handler_base); | ||||
| } | } | ||||
| } | } | ||||
| static bool wm_eventmatch(const wmEvent *winevent, const wmKeyMapItem *kmi) | BLI_INLINE bool wm_eventmatch(const wmEvent *winevent, const wmKeyMapItem *kmi) | ||||
| { | { | ||||
| if (kmi->flag & KMI_INACTIVE) { | if (kmi->flag & KMI_INACTIVE) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| if (winevent->flag & WM_EVENT_IS_REPEAT) { | if (winevent->flag & WM_EVENT_IS_REPEAT) { | ||||
| if (kmi->flag & KMI_REPEAT_IGNORE) { | if (kmi->flag & KMI_REPEAT_IGNORE) { | ||||
| return false; | return false; | ||||
| ▲ Show 20 Lines • Show All 3,673 Lines • ▼ Show 20 Lines | else if (handler_base->poll == nullptr || handler_base->poll(CTX_wm_region(C), event)) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| return nullptr; | return nullptr; | ||||
| } | } | ||||
| bool WM_event_match(const wmEvent *winevent, const wmKeyMapItem *kmi) | |||||
| { | |||||
| return wm_eventmatch(winevent, kmi); | |||||
| } | |||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name Cursor Keymap Status | /** \name Cursor Keymap Status | ||||
| * | * | ||||
| * Show cursor keys in the status bar. | * Show cursor keys in the status bar. | ||||
| * This is done by detecting changes to the state - full key-map lookups are expensive | * This is done by detecting changes to the state - full key-map lookups are expensive | ||||
| * so only perform this on changing tools, space types, pressing different modifier keys... etc. | * so only perform this on changing tools, space types, pressing different modifier keys... etc. | ||||
| ▲ Show 20 Lines • Show All 296 Lines • Show Last 20 Lines | |||||