#54376: fix: draw no border around frameless windows on Linux setups without client-side shadows
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
- I have built and tested this change
- I have filled out the PR description
- I have reviewed and verified the changes
Release Notes
Notes: Fixed a grey border around frameless windows on Linux WMs without compositing.
Backports
Semver Impact
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron