diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_event_query.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_query.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_query.c b/source/blender/windowmanager/intern/wm_event_query.c index e22285214f0..7b5691b99a0 100644 --- a/source/blender/windowmanager/intern/wm_event_query.c +++ b/source/blender/windowmanager/intern/wm_event_query.c @@ -270,6 +270,12 @@ bool WM_event_is_mouse_drag(const wmEvent *event) return ISTWEAK(event->type) || (ISMOUSE_BUTTON(event->type) && (event->val == KM_CLICK_DRAG)); } +bool WM_event_is_mouse_drag_or_press(const wmEvent *event) +{ + return WM_event_is_mouse_drag(event) || + (ISMOUSE_BUTTON(event->type) && (event->val == KM_PRESS)); +} + /** \} */ /* -------------------------------------------------------------------- */ |