Skip to content

Linux: the window shows on Wayland - #360

Merged
shovon merged 1 commit into
mainfrom
wayland-window-shows
Nov 10, 2026
Merged

shovon merged 1 commit into
mainfrom
wayland-window-shows

Conversation

@shovon

@shovon shovon commented Nov 10, 2026

Copy link
Copy Markdown
Owner

On a Linux desktop running Wayland (Ubuntu's GNOME, here), npm start opened DevTools and no app window. The window now shows.

Why it stayed hidden

The window is made with show: false and shown on ready-to-show, so it never flashes an empty frame. ready-to-show waits 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. Where ready-to-show arrives (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

  • Plain npm start on 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 --noEmit and eslint pass on the change.
  • Not tried on macOS or Windows; the path there is the same ready-to-show as before.

Notes

  • This machine is a QEMU VM whose GPU cannot give Chromium OpenGL ES 3.0, so the log shows eglCreateContext errors on every start, and Chromium then draws in software. Those lines are noise and unrelated: --disable-gpu silences them but leaves the window hidden.
  • The commit's subject and body ended up on one line (no blank line between them). Worth fixing the message when this is merged.

🤖 Generated with Claude Code

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>
@shovon
shovon merged commit 847ebf1 into main Nov 10, 2026
1 check passed
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