From cebabfba749a7cf36ad5a636e8f0b220e1ecccc7 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Mon, 6 Apr 2026 00:04:39 -0700 Subject: [PATCH] fix: stop double-reading trackpad under Wayland (evdev + wl_pointer) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Under cage, libinput grabs keyboard/mouse/touchpad and delivers them via wl_pointer_motion (absolute coords). The evdev fallback was ALSO reading the same devices and applying relative deltas on top, causing progressive cursor drift that worsened over time. Skip evdev polling entirely under Wayland — only read NuPhy hidraw. Co-Authored-By: Claude Opus 4.6 (1M context) --- fedac/native/src/input.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fedac/native/src/input.c b/fedac/native/src/input.c index ab15ac8900..14b1ee9e23 100644 --- a/fedac/native/src/input.c +++ b/fedac/native/src/input.c @@ -471,11 +471,10 @@ void input_poll(ACInput *input) { } } - // If we have evdev devices (no udev fallback), poll them too - if (input->count > 0) - goto poll_evdev; - - // Otherwise just poll NuPhy hidraw + // Under Wayland, cage grabs keyboard/mouse/touchpad via libinput. + // Do NOT also read those devices via evdev — double input causes + // progressive cursor drift (Wayland sets absolute pos, evdev adds + // relative deltas on top). Only poll NuPhy hidraw for analog keys. goto poll_hidraw; } #endif -- 2.51.2