Skip to content

fix: draw no border around frameless windows on Linux setups without client-side shadows - #54376

Merged
MarshallOfSound merged 1 commit into
mainfrom
fix-linux-frameless-border-without-shadow
Sep 25, 2026
Merged

MarshallOfSound merged 1 commit into
mainfrom
fix-linux-frameless-border-without-shadow

Conversation

@codebytere

@codebytere codebytere commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Description of Change

Fixes #52024.

After this change frameless windows on Linux have no grey 4px band on WMs without client-side shadow support (no compositing manager, or no _GTK_FRAME_EXTENTS: i3, awesome, xfwm4), as before 43.

When client-side shadows are unavailable, FrameViewLayoutLinux::GetRestoredFrameBorderInsets() falls back to Chromium's solid 4px resize border on the left, right and bottom, and since 43 frameless windows go through that layout and painted the border in the frame color; _GTK_FRAME_EXTENTS read 4,4,0,4 as in the report.

ElectronFrameViewLayoutLinux::GetRestoredFrameBorderInsets() now returns empty insets in that case, as it already does for translucent windows; resizing keeps working through the inside band in ResizingBorderHitTest, which is used exactly when the insets are empty. Verified under Xvfb (no compositing manager): a 400x300 frame: false window was a 408x304 X window with those extents on main and is 400x300 with none here; transparent, WCO and framed windows are unchanged. No spec, since only the X geometry differs.

Checklist

Release Notes

Notes: Fixed a grey border around frameless windows on Linux WMs without compositing.

…client-side shadows

On X11 window managers without a compositing manager or without
_GTK_FRAME_EXTENTS support (i3, awesome, xfwm4) client-side shadows are
unavailable, and the frame layout then fell back to Chromium's solid 4px
resize border on three sides, which frameless windows painted in the frame
color. Frameless windows already resize from an inside band, so return
empty border insets in that case as before 43.
@codebytere codebytere added semver/patch backwards-compatible bug fixes target/43-x-y PR should also be added to the "43-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. labels Sep 25, 2026
@MarshallOfSound
MarshallOfSound merged commit fbbb70d into main Sep 25, 2026
124 checks passed
@release-clerk

release-clerk Bot commented Sep 25, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed a grey border around frameless windows on Linux WMs without compositing.

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "43-x-y", please check out #54390

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "44-x-y", please check out #54391

@trop

trop Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "45-x-y", please check out #54392

@trop trop Bot added in-flight/43-x-y in-flight/44-x-y in-flight/45-x-y merged/45-x-y PR was merged to the "45-x-y" branch. merged/43-x-y PR was merged to the "43-x-y" branch. and removed target/43-x-y PR should also be added to the "43-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. target/45-x-y PR should also be added to the "45-x-y" branch. in-flight/45-x-y in-flight/43-x-y labels Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

46-x-y merged/43-x-y PR was merged to the "43-x-y" branch. merged/44-x-y PR was merged to the "44-x-y" branch. merged/45-x-y PR was merged to the "45-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Linux: frameless windows have a border on non-compositing X11 WMs, e.g. i3

3 participants