srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/config/src/engine/support.rs
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2025-10-03 22:59:00 +0200
committersrdusr <[email protected]>2025-10-03 22:59:00 +0200
commit4eb36873d4ca4b0faf0e54dbeab8f5f6450dd704 (patch)
tree657c89f7398f98b0305b9cd69889c232608f3027 /crates/config/src/engine/support.rs
parentd7031dd060ec12e6de334518aa75122c65794047 (diff)
downloadsrdwm-4eb36873d4ca4b0faf0e54dbeab8f5f6450dd704.tar.gz
srdwm-4eb36873d4ca4b0faf0e54dbeab8f5f6450dd704.zip
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 <bool>`) 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.
Diffstat (limited to 'crates/config/src/engine/support.rs')
-rw-r--r--crates/config/src/engine/support.rs6
1 files changed, 6 insertions, 0 deletions
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<String, ConfigValue> {
// 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