fix(desktop): re-enable titleBarOverlay on plain Linux

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")
This commit is contained in:
Chris Wesley 2026-06-26 12:02:19 -05:00 committed by Teknium
parent 9c7f9f9502
commit 8194dbf612

View file

@ -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
}