Hide Linux titlebar menu chrome#439
Conversation
ilysenko
left a comment
There was a problem hiding this comment.
Current upstream build applies correctly for me: the generated bundle has the transparent 1px Linux titleBarOverlay, Linux removeMenu?.(), and the webview chrome mapping changes Linux back to native.
One thing to tighten before this leaves draft: applyLinuxWindowControlsSafeAreaPatch now has currentInset equal to the default inset because the right safe area is 0. That makes the inset branch a no-op, and the final currentInset check can make future upstream drift look already-applied if upstream keeps applicationMenu:Object.freeze({left:0,right:0}) but changes/removes the chrome-mapping snippets. Since this PR's functional fix depends on those mapping snippets, please track whether the Linux chrome mapping or browser gate was actually found/already in the desired form, and warn if the safe-area bundle is present but neither mapping is recognizable. That keeps future upstream drift visible instead of silently shipping the old Linux application-menu layout.
11e029f to
5a3a59c
Compare
5a3a59c to
5d23bfc
Compare
Summary
titleBarOverlayobject but making it transparent and 1px tallsetMenuBarVisibility(false)andremoveMenu?.()next to the existing WindowsremoveMenu()pathnativeinstead ofapplication-menu, so the renderer no longer reserves application-menu/window-control chrome spaceWhy
Recent Codex Desktop builds can show a Linux app/menu decoration row or a visible top-right Electron titlebar overlay. Removing the overlay object entirely, or switching the window to
frame: false, can crash the Linux build. Keeping the overlay API present while making it visually transparent avoids that crash path while removing the unwanted chrome.Validation
node --check scripts/patches/main-process.jsnode --check scripts/patches/webview-assets.jsnode --test scripts/patch-linux-window-ui.test.jstests/scripts_smoke.shThis behavior was also verified manually through a Nix/Home Manager override against Codex Desktop
26.602.71036on Linux.