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.
The `id` is defined to be sent only once, on creation of the handle or
later. And only for workspaces that are "likely to be stable across
multiple sessions".
Set we add an `id` initially for pinned workspaces, and add one when the
workspace is pinned.
The `id` is not supposed to be human readable, so we just use a random
value.
Adds support for cosmic-workspace-v2 pin, unpin, move_after, and
move_before requests.
Both features need some work with workspaces span displays mode, so that
will need more fixes later.
We also want to generate a unique id for pinned workspaces to send in
the ext-workspace-v1 protocol. But that isn't a strict requirement for
anything. So I haven't yet fully implemented that. We'll also want to
persist other things, like workspace naming when that's added.
Overall, though, with separate workspaces per display, this is working
pretty well.
Make numlock state on boot configurable
This will expose 3 settings for numlock behavior:
1. Numlock is off on boot (this is the current default behavior)
2. Numlock is on on boot
3. Numlock will restore the state from the last boot
Fixes#369
* Address comments:
Get keyboard after create_seat called rather than returning from
create_seat.
Use constants rather than magic numbers for keypress.
Only save updated modifier state after keypresses are handled/skipped.
* Remove unused import, fold other into existing use block.
It seems to derive `CosmicConfigEntry`, we need to use `_` in property
names, because `_` isn't mapped to `-` and there doesn't seem to be a
mechanism like `#[serde(rename)]`.
It seems good to be consistent anyway. So this seems good to change,
unless we really like using `-` for names on disk, then cosmic-panel
needs to be changed.
`CosmicConfigEntry` also requires `PartialEq`, which is easy enough to
add.
This will break existing input settings, which will have to be
re-applied with the new locations. Cosmic-settings also need to be
updated for this.
This is not a setting handled by libinput; we have to scale the
scrolling ourselves.
This should match the behavior of the `scroll_factor` defined in
sway-input(5).