Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-20 14:14:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-20 14:19:16 +0300
commitef09aff61cdc4dc940a022c9e0c7c0ad9519780f (patch)
tree5f79be02041b9ae59254fe78a30bd2907f57c833 /source/blender/windowmanager/WM_types.h
parent454b90483dc72608e9bf7fc205b1ca849622f8d8 (diff)
Preferences: add threshold for cursor motion
A hard coded threshold was used to ignore cursor motion, make this a preference since tablet users may want to increase it since a pen hovering isn't as easy to keep still as a mouse. Resolves T56278
Diffstat (limited to 'source/blender/windowmanager/WM_types.h')
-rw-r--r--source/blender/windowmanager/WM_types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 8ad63cb92c0..96560b423a1 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -499,8 +499,10 @@ typedef struct wmEvent {
* Values below are ignored when detecting if the user interntionally moved the cursor.
* Keep this very small since it's used for selection cycling for eg,
* where we want intended adjustments to pass this threshold and select new items.
+ *
+ * Always check for <= this value since it may be zero.
*/
-#define WM_EVENT_CURSOR_MOTION_THRESHOLD (3 * U.dpi_fac)
+#define WM_EVENT_CURSOR_MOTION_THRESHOLD ((float)U.move_threshold * U.dpi_fac)
/* ************** custom wmEvent data ************** */
typedef struct wmTabletData {