[Linux][WSL2] Desktop app maximize leaves the client at a small size under WSLg
What version of the Codex App are you using (From “About Codex” dialog)?
26.803.81509 (Ubuntu .deb package)
Bundled app-server: codex-cli 0.147.0-alpha.6.6
What subscription do you have?
Plus; this appears independent of subscription.
What platform is your computer?
- Windows 10 Build 19045
- Ubuntu 24.04.4 LTS under WSL2/WSLg
Linux 6.18.33.1-microsoft-standard-WSL2 x86_64 x86_64- Electron/Chromium
151.0.7922.76 - WSLg display is exposed through both X11 (
DISPLAY=:0) and Wayland (WAYLAND_DISPLAY=wayland-0)
What issue are you seeing?
Clicking the maximize button on the native Linux ChatGPT/Codex desktop app does not actually maximize the primary window under WSL2/WSLg. The window manager reports the window as maximized, but the application client remains at a small/restored size instead of filling the WSLg workspace. Depending on the saved bounds, the client remains approximately 800x600 or 801x900, while _NET_WM_STATE contains both MAXIMIZED_VERT and MAXIMIZED_HORZ.
Forcing native Wayland also reproduces the incorrect geometry. A generic decorated X11 xmessage control window maximizes and restores normally in the same WSLg session.
What steps can reproduce the bug?
- Install the Linux
.debinside Ubuntu 24.04 running under WSL2. - Launch the app through WSLg and open the primary window.
- Click the window maximize button.
- Observe that the app reports/indicates a maximized state, but the client content does not expand to the WSLg workspace.
- Restore and maximize again; the state/geometry mismatch remains.
For diagnostics, xwininfo -root -tree shows the ChatGPT client staying around 800x600/801x900 while xprop reports both EWMH maximized-state atoms. The same EWMH operation works correctly for a decorated xmessage window.
What is the expected behavior?
Clicking maximize should expand the ChatGPT/Codex client to the available WSLg workspace, and restore should return it to the previous normal bounds. The maximized state and client geometry should remain consistent across relaunches.
Additional information
The installed main bundle creates the primary and quick-chat Linux windows with Electron's custom borderless title-bar configuration (titleBarStyle: "hidden" plus titleBarOverlay). The controlled results isolate the failure to that custom-decoration path:
- X11 and native Wayland: same failure;
- generic decorated X11 window: maximize/restore works normally.
This appears related to WSLg's known borderless-maximize behavior: https://github.com/microsoft/wslg/issues/1015
A native system title bar/decorations on Linux, or another WSLg-compatible maximize path, appears likely to resolve the geometry mismatch while leaving the current Windows title-bar behavior unchanged.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action