config: group cursor hiding into CursorHideConfig

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.
This commit is contained in:
Niklas Herder 2026-09-12 08:59:31 +02:00 • committed by Victoria Brekenfeld
parent b975370968
commit 6e0aea0eb2
3 changed files with 171 additions and 10 deletions

View file

@ -839,7 +839,7 @@ const ACTIVITY_THROTTLE: Duration = Duration::from_millis(100);
/// Reveal the cursor and (re)arm the idle-hide timer; returns true if it was previously hidden
pub fn notify_cursor_activity(state: &State, seat: &Seat<State>) -> bool {
let timeout = state.common.config.cosmic_conf.cursor_hide_timeout;
let timeout = state.common.config.cosmic_conf.cursor_hide.idle_timeout;
let loop_handle = &state.common.event_loop_handle;
let cursor_state = seat.user_data().get::<CursorState>().unwrap();
let now = Instant::now();