diff options
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/wm_event_types.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 6cf7a33e06e..cc98f7a08a6 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -5142,11 +5142,15 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, void case GHOST_kRelease: event.val = KM_RELEASE; break; + default: + BLI_assert_unreachable(); } event.custom = 0; event.customdata = NULL; + wm_event_state_update_and_click_set(&event, event_state); + wm_event_add(win, &event); break; diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index fd0760d1d1c..5ced501dd49 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -371,7 +371,8 @@ enum { * \note Mouse wheel events are excluded from this macro, while they do generate press events it * doesn't make sense to have click & click-drag events for a mouse-wheel as it can't be held down. */ -#define ISKEYBOARD_OR_BUTTON(event_type) (ISMOUSE_BUTTON(event_type) || ISKEYBOARD(event_type)) +#define ISKEYBOARD_OR_BUTTON(event_type) \ + (ISMOUSE_BUTTON(event_type) || ISKEYBOARD(event_type) || ISNDOF_BUTTON(event_type)) /** Test whether the event is a modifier key. */ #define ISKEYMODIFIER(event_type) \ |