From 8194dbf6126f404a43acb93f2778854d3c1a620e Mon Sep 17 00:00:00 2001 From: Chris Wesley <128256017+chriswesley4@users.noreply.github.com> Date: Fri, 26 Jun 2026 12:02:19 -0500 Subject: [PATCH] fix(desktop): re-enable titleBarOverlay on plain Linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit da5484b61 disabled the Window Controls Overlay on all Linux (non-Windows, non-WSL) with the note that WCO is a Windows/macOS-only Electron feature. However, several Linux compositors (KDE/KWin, GNOME/Mutter) do support it — plain Electron titleBarOverlay paints native min/max/close buttons that were working before that change. Narrow the exclusion to only WSLg, where the RDP host draws its own window controls and an Electron overlay would leave a dead gap. Fixes: da5484b61 ("fix(desktop): WSL2 clipboard image paste + Linux titlebar overlay") --- apps/desktop/electron/main.cjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/desktop/electron/main.cjs b/apps/desktop/electron/main.cjs index 5d859bca649..002280e888e 100644 --- a/apps/desktop/electron/main.cjs +++ b/apps/desktop/electron/main.cjs @@ -534,9 +534,10 @@ function getTitleBarOverlayOptions() { return { height: TITLEBAR_HEIGHT } } - // Windows + WSLg paint WCO natively; plain Linux disables it (frameless hidden - // titlebar still applies). - if (!IS_WINDOWS && !IS_WSL) { + // WSLg paints WCO via the RDP host's own min/max/close, so requesting + // an Electron overlay there just leaves a dead gap. Plain Linux (KDE, + // GNOME) can use the native overlay — let it through. + if (!IS_WINDOWS && IS_WSL) { return false }