From 4eb36873d4ca4b0faf0e54dbeab8f5f6450dd704 Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Fri, 3 Oct 2025 22:59:00 +0200 Subject: Make the secondary-cursor sprite opt-in and expire stale entries Live report: a second cursor appeared uninvited and unusably (frozen, uncontrollable) on screen. Multi-cursor Phase 1 rendered one sprite per physical libinput pointer device that had ever reported a position, with no way to turn it off and no expiry - so a phantom device (a real mouse's side-button/scroll cluster enumerating as its own HID path is a common case) that reports once and never moves again left a frozen ghost sprite with nothing to control or dismiss it. Adds general.multi_cursor (default false, live-settable via `srd set multi_cursor `) and keys secondary_cursors to (Point, Instant) so both the recording side (udev/session.rs) and the render side (udev/render.rs) drop any entry older than SECONDARY_CURSOR_TIMEOUT (1.5s). The "agent controls a window without interrupting the user" use case this report also raised was never gated on this flag - that's Multi-cursor Phase 2's pinned virtual-pointer delivery, which never shows a visible cursor at all. --- crates/config/src/engine/support.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/config/src/engine') diff --git a/crates/config/src/engine/support.rs b/crates/config/src/engine/support.rs index 97c499f..5574bee 100644 --- a/crates/config/src/engine/support.rs +++ b/crates/config/src/engine/support.rs @@ -159,6 +159,12 @@ pub(super) fn default_config() -> HashMap { // completely unaffected - see `WindowManager::phone_mode`'s own doc // comment. set("general.phone_mode", Bool(false)); + // `false`: an extra cursor sprite per other physical pointer device is + // opt-in, not automatic - see `WindowManager::multi_cursor_enabled`'s + // own doc comment for the real, reported reason (a phantom libinput + // device from otherwise-ordinary hardware showing up as an + // uncontrollable frozen ghost cursor). + set("general.multi_cursor", Bool(false)); // Real desktop icons (Home/Computer/Trash plus `~/Desktop`'s own // contents) on by default - see `WindowManager::desktop_icons_ // enabled`'s own doc comment for why this, unlike `general.gpu` just -- cgit v1.2.3