The timer now decides on fire rather than at arm time, so a shorter
fullscreen timeout applies without hooking any of the six fullscreen
transition sites in shell/mod.rs. Arming still touches no shell lock,
which the PointerMotion call site requires.
hidden becomes Option<HideReason> so the reveal rule can depend on why
the cursor went away.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Drafted with Claude (Anthropic); reviewed and tested by the committer.
Replaces the flat cursor_hide_timeout key with a grouped cursor_hide key
carrying the idle, fullscreen-idle, typing and touch triggers, plus the
pure decision function the compositor's idle timer evaluates on fire.
The fullscreen timeout shortens the global one rather than replacing it,
so an unset fullscreen timeout cannot suppress an enabled global one.
Drafted with Claude (Anthropic); reviewed and tested by the committer.
Adds a cursor_hide_timeout config key (Option<u32> seconds) to
CosmicCompConfig. When set, the cursor is hidden after the configured
period of pointer inactivity and revealed again by any pointer event.
Touch input does not count as activity (no visible cursor to surface).
Implementation:
- Per-seat hidden flag, calloop timer token, and last-armed Instant on
CursorStateInner.
- notify_cursor_activity called from each pointer-related input branch
(motion, button, axis, tablet) resets the flag and reschedules the
timer; rapid successive calls are coalesced behind a 100ms throttle
so high-frequency mice don't churn the calloop timer source.
- On timer fire, the hidden flag is set, draw_cursor short-circuits to
an empty element list, and a render is scheduled. Active pointer
grabs (drags, resizes) suppress the hide.
- Config reload arms or cancels the timer immediately; None as the
configured value collapses the cancel path into the same function.
Closes#2231.
Drafted with Claude (Anthropic); reviewed and tested by the committer.
We'll probably want to add support for `cursor-shape-v1`. Not sure about
`wlr-data-control-unstable-v1`. But this just updates to work with the
latest smithay commit for new.