diff options
Diffstat (limited to 'source')
4 files changed, 4 insertions, 12 deletions
diff --git a/source/blender/editors/interface/interface_region_menu_pie.cc b/source/blender/editors/interface/interface_region_menu_pie.cc index b11564f09c5..09902dd6c35 100644 --- a/source/blender/editors/interface/interface_region_menu_pie.cc +++ b/source/blender/editors/interface/interface_region_menu_pie.cc @@ -371,7 +371,7 @@ void ui_pie_menu_level_create(uiBlock *block, EnumPropertyItem *remaining = static_cast<EnumPropertyItem *>( MEM_mallocN(array_size + sizeof(EnumPropertyItem), "pie_level_item_array")); memcpy(remaining, items + totitem_parent, array_size); - /* A nullptr terminating sentinel element is required. */ + /* A null terminating sentinel element is required. */ memset(&remaining[totitem_remain], 0, sizeof(EnumPropertyItem)); /* yuk, static... issue is we can't reliably free this without doing dangerous changes */ diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h index a3d9b5fc7b6..116ea4821cb 100644 --- a/source/blender/makesdna/DNA_windowmanager_types.h +++ b/source/blender/makesdna/DNA_windowmanager_types.h @@ -407,13 +407,13 @@ enum { KMI_USER_MODIFIED = (1 << 2), KMI_UPDATE = (1 << 3), /** - * When set, ignore events with #wmEvent.is_repeat enabled. + * When set, ignore events with `wmEvent.flag & WM_EVENT_IS_REPEAT` enabled. * * \note this flag isn't cleared when editing/loading the key-map items, * so it may be set in cases which don't make sense (modifier-keys or mouse-motion for example). * * Knowing if an event may repeat is something set at the operating-systems event handling level - * so rely on #wmEvent.is_repeat being false non keyboard events instead of checking if this + * so rely on #WM_EVENT_IS_REPEAT being false non keyboard events instead of checking if this * flag makes sense. * * Only used when: `ISKEYBOARD(kmi->type) || (kmi->type == KM_TEXTINPUT)` diff --git a/source/blender/windowmanager/intern/wm_event_system.cc b/source/blender/windowmanager/intern/wm_event_system.cc index a371fa7e185..757c3aae00c 100644 --- a/source/blender/windowmanager/intern/wm_event_system.cc +++ b/source/blender/windowmanager/intern/wm_event_system.cc @@ -2086,8 +2086,6 @@ static bool wm_eventmatch(const wmEvent *winevent, const wmKeyMapItem *kmi) /* The matching rules. */ if (kmitype == KM_TEXTINPUT) { if (winevent->val == KM_PRESS) { /* Prevent double clicks. */ - /* Not using #ISTEXTINPUT anymore because (at least on Windows) some key codes above 255 - * could have printable ascii keys, See T30479. */ if (ISKEYBOARD(winevent->type) && winevent->utf8_buf[0]) { return true; } @@ -5328,7 +5326,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, void break; } - /* Might be not nullptr terminated. */ + /* Might be not null terminated. */ memcpy(event.utf8_buf, kd->utf8_buf, sizeof(event.utf8_buf)); if (kd->is_repeat) { event.flag |= WM_EVENT_IS_REPEAT; diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index 2d3624704d0..edac3ada73b 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -358,12 +358,6 @@ enum { /** Test whether the event is timer event. */ #define ISTIMER(event_type) ((event_type) >= TIMER && (event_type) <= TIMERF) -/* for event checks */ -/* only used for KM_TEXTINPUT, so assume that we want all user-inputtable ascii codes included */ -/* Unused, see #wm_eventmatch, see: T30479. */ -// #define ISTEXTINPUT(event_type) ((event_type) >= ' ' && (event_type) <= 255) -/* NOTE: an alternative could be to check `event->utf8_buf`. */ - /** Test whether the event is a key on the keyboard (including modifier keys). */ #define ISKEYBOARD(event_type) \ (((event_type) >= _EVT_KEYBOARD_MIN && (event_type) <= _EVT_KEYBOARD_MAX) || \ |