Skip to content

fix(desktop): map GNOME X11 window before Mutter management - #5435

Draft
neodaysoff wants to merge 1 commit into
block:mainfrom
neodaysoff:agent/fix-linux-x11-window-mapping
Draft

fix(desktop): map GNOME X11 window before Mutter management#5435
neodaysoff wants to merge 1 commit into
block:mainfrom
neodaysoff:agent/fix-linux-x11-window-mapping

Conversation

@neodaysoff

Copy link
Copy Markdown

Summary

  • add a Linux-only GTK startup path that maps the hidden window once with override_redirect, then remaps it under Mutter management
  • skip saved window-state restoration on Linux to avoid racing the initial hidden map
  • ship an opaque, normal-size, frameless Linux window configuration with client-side minimize, maximize/restore, and close controls
  • leave macOS and Windows startup behavior unchanged

Root cause

On an NVIDIA DGX Spark running Ubuntu 24.04 with GNOME/X11, Mutter accepted Buzz's correctly sized GTK client but immediately left it in WM_STATE=Iconic and Map State: IsUnMapped. Calls to show, unminimize, focus, delayed reveal, opaque rendering, and the existing WebKit safe-rendering settings did not map it.

Realizing the hidden GTK ApplicationWindow, performing its first map outside window-manager redirection, and handing it back to Mutter after 100 ms produced a normal managed window. Native decorations reintroduced the Iconic state on the affected system, so the Linux configuration uses application chrome.

This addresses the GNOME/X11 mapping path reported in #2811. The original Fedora/Skia transparent-window report may have a separate rendering cause, so this PR does not close the broader issue.

User impact

Affected Linux users get a visible, taskbar-managed window with working focus, movement, resizing, minimize/maximize, close, and Alt-F4 behavior. Linux starts at a normal size rather than restoring saved maximized state; macOS and Windows continue restoring window state.

The ARM64 sidecar packaging issue noted in the field report is intentionally out of scope.

Validation

  • cargo fmt --manifest-path desktop/src-tauri/Cargo.toml --all -- --check
  • cargo check --manifest-path desktop/src-tauri/Cargo.toml --lib
  • pnpm -C desktop exec biome check src/app/AppTopChrome.tsx
  • pnpm -C desktop typecheck
  • pnpm -C desktop build
  • pnpm -C desktop check:file-sizes
  • equivalent production ARM64 patch previously installed and verified on one DGX Spark: IsViewable, WM_STATE=Normal, override redirect disabled after remap, onboarding completed

Signed-off-by: Neo Days Off neodaysoff@users.noreply.github.com

Signed-off-by: Neo Days Off <neodaysoff@users.noreply.github.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.

1 participant