diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-30 07:17:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-30 08:02:53 +0300 |
commit | 82e8e5c871f86e65f332cdde3bd484a55e7e8572 (patch) | |
tree | ccbd4e45e339bd4c62231d12b3499bdfdeaed6e4 /source/blender/windowmanager/WM_types.h | |
parent | 2437a8b6f02144d796829a32461878ff2160c791 (diff) |
Cleanup: move click/drag events to functions
Simplifies future changes to dragging checks and avoids
each check for drag using slightly different logic.
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index f3771ea22a4..20bb5935c8e 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -528,7 +528,9 @@ typedef struct wmEvent { /** * Values below are considered a click, above are considered a drag. */ -#define WM_EVENT_CURSOR_CLICK_DRAG_THRESHOLD (U.tweak_threshold * U.dpi_fac) +int WM_event_cursor_click_drag_threshold_from_event_(const wmEvent *event); + +bool WM_event_cursor_click_drag_threshold_met(const wmEvent *event); /** * Values below are ignored when detecting if the user interntionally moved the cursor. |