Skip to content

Fix overlay selection state and harden IPC/input paths - #5

Merged
nnthnn merged 2 commits into
mainfrom
feat/todo-overlay-fixes
Nov 10, 2026
Merged

nnthnn merged 2 commits into
mainfrom
feat/todo-overlay-fixes

Conversation

@nnthnn

@nnthnn nnthnn commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the high-priority show_empty_workspaces selection mismatch and clears
out the deferred overlay state, input, capture, IPC, and lock-file issues from
TODO.md. The visible workspace list is now the single index space for
selection, keyboard navigation, pointer hit-testing, and drawing.

Changes

  • Map selected, keyboard navigation, workspace_at/window_at, and redraw
    onto the same visible workspace list; remap selection by name across config
    reloads and clamp it when the list shrinks.
  • Clear the Tab highlight on every navigation press, keep the current card when
    a filter is cleared, reject stale Tab targets under a filter, make
    out-of-range number keys a no-op, and reset hover/pointer/Shift state in
    hide().
  • Apply behavior.no_preview and behavior.allow_mouse on config reload,
    including binding wl_pointer and restarting captures.
  • Skip/drain capture work when previews are unavailable, and reuse Cairo
    thumbnail surfaces instead of cloning pixels on every redraw.
  • Add Sway IPC read/write timeouts, handle short writes for SHM frames, decode
    escaped quotes in the Hyprland JSON parser, open the lock file with
    O_NOFOLLOW/mode 0600 and reject non-regular files, and make parse_hex()
    char-safe.
  • Key the icon cache by size and refresh it when the icon theme changes.
  • Document the US-QWERTY/ASCII input limitation, update the changelog, and trim
    completed entries from TODO.md.

Testing

  • just check (fmt, clippy with -D warnings, 81 unit tests)
  • cargo build --release --locked

The visible workspace list is now the single index space for selection,
keyboard navigation, pointer hit-testing, and drawing. Previously
show_empty_workspaces filtered the draw list while every other caller used
the raw list, so the highlight and mouse targets could disagree.

Also fix the related input-state bugs: clear the Tab highlight on every
navigation press, keep the current card when a filter is cleared, reject
stale Tab targets under a filter, make out-of-range number keys a no-op,
and reset hover/pointer/Shift state when hiding the overlay.

Apply no_preview and allow_mouse on config reload (binding wl_pointer if
needed), drop capture work when previews are unavailable, and reuse Cairo
thumbnail surfaces instead of cloning pixels on every redraw.

Harden the edges found in the same review: Sway IPC read/write timeouts,
short-write handling for SHM frames, escaped quotes in the hand-rolled
Hyprland JSON parser, symlink-safe lock files with mode 0600, and
char-safe hex color parsing. Add regression tests for each fix.
Keep only open follow-ups so the file stays a current work queue rather
than an accumulating checklist. Completed entries are recorded in the
changelog and the commit history.
@nnthnn
nnthnn merged commit ff37047 into main Nov 10, 2026
3 checks passed
@nnthnn
nnthnn deleted the feat/todo-overlay-fixes branch November 10, 2026 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant