aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2022-10-16 17:19:54 +0200
committerMichael Stapelberg <michael@stapelberg.de>2022-10-24 21:12:53 +0200
commitf1754e12c043742a8df13eee0175417ae20788de (patch)
tree3a2fe12371bd7f41d9623f79cd11d8ea129ec144
parente12d2f6a1de3f811bb8b478c55000f727207a66d (diff)
downloadi3-f1754e12c043742a8df13eee0175417ae20788de.tar.gz
i3-f1754e12c043742a8df13eee0175417ae20788de.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;
}