Skip to content

Open the launcher in one frame: keep its surface mapped - #76

Open
nchudleigh wants to merge 1 commit into
typecraft-dev:mainfrom
nchudleigh:perf/instant-open
Open

nchudleigh wants to merge 1 commit into
typecraft-dev:mainfrom
nchudleigh:perf/instant-open

Conversation

@nchudleigh

Copy link
Copy Markdown

Each open mapped a new layer surface. The output's size arrived about 14 ms later and its scale about 54 ms later, so the card showed roughly 130 ms after the hotkey. Every open also ran the root search again.

  • The surface stays mapped once opened. Hidden, it draws nothing, takes no input (an empty mask) and has no keyboard (keyboardFocus: None), so opening is a single commit. It is pinned to the focused monitor and only remapped to move to another one.
  • Hiding already pops to root and rebuilds, so opening reuses that list when the candidates and stores haven't changed since, instead of searching again.
  • tests/smoke.sh now times the keyboard handoff by polling the layer's keyboard_interactivity, since a mapped layer sends no open or close events.

Measured in the shell, from the open request to the content showing: about 130 ms before, 5–7 ms after (plus one frame). The first open after a reload still maps the surface. The smoke test's numbers include about 45 ms for the omacast CLI round trip, which the hotkey doesn't use.

Checked: typing reaches the launcher, the keyboard goes back to the window when it hides, and node --test tests/ passes. Not checked: clicks passing through the hidden surface (no pointer tool on the test machine). Quickshell treats an empty Region mask as no input.

🤖 Generated with Claude Code

Each open mapped a new layer surface, and the output's size and scale arrived
a few frames later, so the card appeared ~130 ms after the hotkey. The surface
now stays mapped once opened; hidden, it is transparent, takes no input and no
keyboard, so opening is one commit. It is remapped only to move to another
monitor. Hiding already rebuilds the root list, so opening reuses it when the
candidates and stores are unchanged instead of searching again.

Open to visible: ~130 ms -> 5-7 ms plus a frame. The smoke test now times the
keyboard handoff, since a mapped layer sends no open/close events.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants