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-05-29 11:13:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-29 11:13:33 +0300
commit07d453dd9e0207ff74c0f85583ef9fcc8d54a218 (patch)
tree00af234ccda861f81cbf1b0035e081ae04129241 /source/blender/windowmanager/intern/wm_gesture.c
parent8949dfb7a6e2cc9c24d43b0cac4342a1962e22d9 (diff)
UI: use matching distance checks & define for dragging
Diffstat (limited to 'source/blender/windowmanager/intern/wm_gesture.c')
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index e117a1bcdfe..bc985087475 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -134,8 +134,8 @@ int wm_gesture_evaluate(wmGesture *gesture)
rcti *rect = gesture->customdata;
int dx = BLI_rcti_size_x(rect);
int dy = BLI_rcti_size_y(rect);
- float tweak_threshold = U.tweak_threshold * U.dpi_fac;
- if (abs(dx) + abs(dy) > tweak_threshold) {
+ const int drag_threshold = WM_EVENT_CURSOR_CLICK_DRAG_THRESHOLD;
+ if (abs(dx) >= drag_threshold || abs(dy) >= drag_threshold) {
int theta = round_fl_to_int(4.0f * atan2f((float)dy, (float)dx) / (float)M_PI);
int val = EVT_GESTURE_W;