Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
feat(gestures): raise the default first swipe step to 70
swipe_threshold now defaults to 70 libinput units instead of 50. A replay
of a session's logged three-finger swipes showed every deliberate first
step travelling 75 or more, so 70 adds resistance to the first switch
while dropping only hesitant swipes. Later steps keep defaulting to four
times the first, which is now 280.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CLAUDE.md | 4 +++-
src/server/config.rs | 6 +++---
src/server/cursor.rs | 2 +-
src/server/window_manager.rs | 10 +++++-----
4 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/CLAUDE.md b/CLAUDE.md
index 8f38bec5..062c8212 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -530,7 +530,9 @@ same.
**Swipe binds peek before they fire.** A three-finger swipe bound to a
directional focus or pan (`focus_left (gesture)"swipe3_left"` in input.kdl)
fires once the accumulated travel passes `window_manager { swipe_threshold }`
-(libinput units, default 50; `WindowManager::swipe_threshold`). Short of
+(libinput units, default 70; `WindowManager::swipe_threshold`; it was 50
+until 2026-09-24, when a replay of logged swipes showed every deliberate
+first step travelling 75 or more, so 70 drops only hesitant ones). Short of
that the camera *leans* toward the bind the
swipe is heading for, 1:1 with the fingers along the swipe's dominant axis
only (a hand's sideways drift must not lean the camera vertically, or the
diff --git a/src/server/config.rs b/src/server/config.rs
index c0910d43..a52cba43 100644
--- a/src/server/config.rs
+++ b/src/server/config.rs
@@ -452,12 +452,12 @@ pub struct WindowManagerConfig {
/// config.kdl's wholesale. See "Swipe binds peek" in CLAUDE.md.
pub swipe_peek: Option<f64>,
/// Accumulated travel (libinput units, roughly mm) at which a swipe
- /// bind fires (default 50). KDL: `swipe_threshold (f64)50.0`.
+ /// bind fires (default 70). KDL: `swipe_threshold (f64)70.0`.
pub swipe_threshold: Option<f64>,
/// Travel each further fire of the same swipe needs after its first
/// (default four times `swipe_threshold`), so a swipe that has just
/// stepped focus meets more resistance before stepping again. KDL:
- /// `swipe_repeat_threshold (f64)200.0`.
+ /// `swipe_repeat_threshold (f64)280.0`.
pub swipe_repeat_threshold: Option<f64>,
/// Reverse the drag direction, on top of the natural-scroll correction
/// the drag already makes. KDL: `touchpad_view_invert (bool)true`.
@@ -2536,7 +2536,7 @@ pub fn parse_config(path: &str, state: &mut crate::window_manager::WindowManager
state.swipe_threshold = tv
.and_then(|w| w.swipe_threshold)
.filter(|v| v.is_finite() && *v > 0.0)
- .unwrap_or(50.0);
+ .unwrap_or(70.0);
state.swipe_repeat_threshold = tv
.and_then(|w| w.swipe_repeat_threshold)
.filter(|v| v.is_finite() && *v > 0.0)
diff --git a/src/server/cursor.rs b/src/server/cursor.rs
index c075f58c..daa56bcd 100644
--- a/src/server/cursor.rs
+++ b/src/server/cursor.rs
@@ -3579,7 +3579,7 @@ unsafe extern "C" fn handle_touch_frame(listener: *mut ffi::wl_listener, _data:
/// A directional swipe bind fires once the accumulated travel (libinput
/// units) passes `window_manager { swipe_threshold }`
-/// (`WindowManager::swipe_threshold`, default 50). Until then the camera
+/// (`WindowManager::swipe_threshold`, default 70). Until then the camera
/// *peeks*: it pans toward the swipe direction in proportion to the
/// travel, up to `window_manager { swipe_peek }` screen px
/// (`WindowManager::swipe_peek_px`, default 60) at the threshold, and
diff --git a/src/server/window_manager.rs b/src/server/window_manager.rs
index 125e558a..f63c2708 100644
--- a/src/server/window_manager.rs
+++ b/src/server/window_manager.rs
@@ -218,7 +218,7 @@ pub struct WindowManager {
/// 0 disables). See `cursor::swipe_peek_for`.
pub swipe_peek_px: f64,
/// `window_manager { swipe_threshold }`: accumulated swipe travel
- /// (libinput units) at which a swipe bind fires (default 50).
+ /// (libinput units) at which a swipe bind fires (default 70).
pub swipe_threshold: f64,
/// `window_manager { swipe_repeat_threshold }`: the travel each FURTHER
/// fire of the same swipe needs after its first (default four times
@@ -536,8 +536,8 @@ impl WindowManager {
self.touchpad_view_swipe_tumble = false;
self.touchpad_view_sensitivity = 1.0;
self.swipe_peek_px = 60.0;
- self.swipe_threshold = 50.0;
- self.swipe_repeat_threshold = 200.0;
+ self.swipe_threshold = 70.0;
+ self.swipe_repeat_threshold = 280.0;
self.touchpad_view_invert = false;
self.touchpad_hscroll_shift_apps = Vec::new();
self.display = std::collections::HashMap::new();
@@ -619,8 +619,8 @@ impl WindowManager {
self.touchpad_view_swipe_tumble = false;
self.touchpad_view_sensitivity = 1.0;
self.swipe_peek_px = 60.0;
- self.swipe_threshold = 50.0;
- self.swipe_repeat_threshold = 200.0;
+ self.swipe_threshold = 70.0;
+ self.swipe_repeat_threshold = 280.0;
self.touchpad_view_invert = false;
self.touchpad_hscroll_shift_apps = Vec::new();
self.display = std::collections::HashMap::new();