Repository navigation
Linux: the window shows on Wayland - #360
Merged
Merged
Conversation
The window is made hidden and shown on ready-to-show, so it never flashes an empty frame. Wayland never paints a window that is not shown yet, so there ready-to-show never comes and the window stays hidden for good: npm start opened DevTools and nothing else. The page having finished loading now shows it too, whichever comes first. The window's background colour already matches the page's, so showing it a moment before its first paint does not flash. 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.
On a Linux desktop running Wayland (Ubuntu's GNOME, here),
npm startopened DevTools and no app window. The window now shows.Why it stayed hidden
The window is made with
show: falseand shown onready-to-show, so it never flashes an empty frame.ready-to-showwaits for the first paint, and Wayland never paints a window that has not been shown yet, so the event never came and the window stayed hidden for good. DevTools opens a window of its own, which is why it was all that showed.The same build under XWayland (
--ozone-platform=x11) shows its window as before, which is what pins it on Wayland.The fix (
src/main/index.ts)The page having finished loading (
did-finish-load) now shows the window too, whichever comes first, and a second call does nothing. Whereready-to-showarrives (macOS, Windows, X11) it still comes first, so nothing changes there. The window's background colour already matches the page's, so showing it just before its first paint does not flash.Checked
npm starton Wayland, no flags: the window is visible, draws frames, and shows the "Pick an empty folder" page (checked from the main process through the inspector).tsc --noEmitandeslintpass on the change.ready-to-showas before.Notes
eglCreateContexterrors on every start, and Chromium then draws in software. Those lines are noise and unrelated:--disable-gpusilences them but leaves the window hidden.🤖 Generated with Claude Code