aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2022-10-16 17:19:54 +0200
committerMichael Stapelberg <stapelberg@users.noreply.github.com>2022-10-16 18:21:08 +0200
commit6479cb7debd8a6134723e85c75295c72a93400d0 (patch)
tree399e81107d69969b8a2ae6d27b963b2f64b2bb29
parent81287743869a5bdec4ffc0c1e6d1f8fd33920bcb (diff)
downloadi3-6479cb7debd8a6134723e85c75295c72a93400d0.tar.gz
i3-6479cb7debd8a6134723e85c75295c72a93400d0.zip
increase drag threshold, run it through logical_px()
related to https://github.com/i3/i3/issues/5155
-rw-r--r--src/drag.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drag.c b/src/drag.c
index 67ccff40..582dbb17 100644
--- a/src/drag.c
+++ b/src/drag.c
@@ -42,7 +42,8 @@ struct drag_x11_cb {
static bool threshold_exceeded(uint32_t x1, uint32_t y1,
uint32_t x2, uint32_t y2) {
- const uint32_t threshold = 9;
+ /* The threshold is about the height of one window decoration. */
+ const uint32_t threshold = logical_px(15);
return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) > threshold * threshold;
}