Repository navigation
Conversation
Launched from a terminal on macOS, the window could stay blank until clicked: the first frames were asked for before the window was on screen, the surface came back occluded or timed out, and redraw() returned without asking again. Nothing else asks for a frame until input arrives. Redraw on WindowEvent::Occluded(false), and ask again after a timeout. An occluded surface still returns without asking, so a hidden window does not spin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Launching
stet file.mdfrom a terminal on macOS could open a blank windowthat only drew the document after a click. With
STET_TIMING=1 stet -f, thefirst redraw was requested three times and laid out each time, but no surface
texture was ever acquired and nothing asked again:
redraw()returned onOccludedandTimeoutwithout requesting anotherframe, and there was no handler for
WindowEvent::Occluded, so the droppedframe was never retried until input arrived.
WindowEvent::Occluded(false)now requests a redraw.Timeoutrequests another frame instead of dropping it.Occludedstill returns without retrying, so a hidden or minimized windowdoesn't spin.
Verification
after,
tour.mddraws on launch, and the timing log reachesfirst frame presentedwith no input.timing, which
--screenshot(headless) doesn't create. Happy to add one if--drivecan reproduce it.cargo fmt --check,cargo clippy --all-targets --all-features -D warnings,cargo docwith-D warnings, andcargo test --all-targets --all-features(307 passed, 2 ignored) all pass locally.
cargo auditfails onmaintoo (RUSTSEC-2026-0433, pulldown-cmark 0.13.5);unrelated to this change, and addressed in a separate PR.
Checklist
🤖 Generated with Claude Code