Repository navigation
fix(rt_desktop): reveal initial window on first paint (startup black flash) - #35620
Merged
crowlKats merged 2 commits intoJul 1, 2026
Merged
Conversation
… black flash The bootstrap desktop window was created visible up front and navigated to app:// only after the in-process server bound (up to 15s later), leaving the user staring at an empty webview. On Wayland the compositor presents that pre-load frame verbatim as solid black (issue denoland#35530). Create the initial window hidden (new laufey HIDDEN flag) and reveal it from its on_page_load handler once content has painted, so its first visible frame already has content. A 10s fallback show() guards against a load that never finishes (e.g. the initial navigation errors). Requires laufey 0.5.0 (adds the hidden flag + page-load event). Closes denoland#35530
crowlKats
marked this pull request as ready for review
July 1, 2026 03:35
…-black-flicker # Conflicts: # cli/rt_desktop/lib.rs
littledivy
approved these changes
Jul 1, 2026
This was referenced Jul 1, 2026
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.
Closes #35530
Problem
The bootstrap desktop window was created visible up front and only navigated
to
app://after the in-process server bound (polled up to 15s). Between those,the user stared at an empty webview. The bug is platform-independent, but on
Wayland the compositor only presents committed buffers, so the empty
pre-load frame shows as solid black — the symptom in #35530. (X11 masks it
with the theme background; macOS with white — much less noticeable.)
Fix
Reveal the window only once content has painted (the Electron
ready-to-showmodel), using two new laufey capabilities (littledivy/laufey#29):
WefDesktopApi::create_initial_windowcreates the bootstrap window hidden(
LAUFEY_WINDOW_FLAG_HIDDEN) and reveals it from itson_page_loadhandler —guarded by an
AtomicBoolso later in-app navigations don't re-show a windowthe app has hidden.
navigate_futkeeps a singlenavigatecall plus a 10s fallbackshow()so a load that never finishes (e.g. the initial navigation errors) can't leave
the user with no window at all.
show()is idempotent.So the window's first visible frame already has content — no empty/black frame
on any backend.
Test plan
cargo clippy -p denort_desktopclean (against a local laufey 0.5.0 patch)already painted. Needs verification on the reporter's setup.