Repository navigation
fix: remove 1px line from the top of frameless windows on Linux - #51458
Conversation
|
Backporting will need to be manual because of the Linux frame layout refactor but will be very straightforward. |
ab687d6 to
1cd83ac
Compare
|
The change itself looks good to me, and as you mentioned, it's necessary to enable rounded corners. However, I'm not sure if this is a true fix for #51457. Unfortunately, I couldn't reproduce this issue on any Electron version. If the bug is still visible with ElectronFrameViewLinux, I think there's some other place where 1px is being added or removed. |
|
@aiddya Right, it did occur to me that the root view is taller than it should be by 1px (and has been forever on Linux). My thinking is it doesn't matter too much in practice because the window bounds and content bounds are still accurate, the root view doesn't show up in APIs, and the transparency change needs to be made anyway. So the question for me is whether it's worth hunting down the discrepancy (or maybe turning it into a followup for internal cleanup). |
|
That's fair. I guess the true root cause is non-trivial since I could not reproduce the issue at all with mutter. |
1cd83ac to
f09cbe2
Compare
f09cbe2 to
72f0271
Compare
72f0271 to
f78a93b
Compare
1224feb to
e1c5d21
Compare
…backgroundColor is not set cache background color since it is no longer set on root view
e1c5d21 to
bd301d5
Compare
|
I was unable to backport this PR to "41-x-y" cleanly; |
|
I was unable to backport this PR to "42-x-y" cleanly; |
|
I have automatically backported this PR to "43-x-y", please check out #51999 |
|
Release Notes Persisted
|
…tron#51458) fix: remove white line from the top of frameless windows on Linux if backgroundColor is not set cache background color since it is no longer set on root view
…tron#51458) fix: remove white line from the top of frameless windows on Linux if backgroundColor is not set cache background color since it is no longer set on root view
…) (#52004) fix: remove white line from the top of frameless windows on Linux if backgroundColor is not set cache background color since it is no longer set on root view
…) (#52005) fix: remove white line from the top of frameless windows on Linux if backgroundColor is not set cache background color since it is no longer set on root view
Description of Change
Fixes #51457.
On Linux, CSD frames are responsible for drawing everything outside of their web contents, so all backing views should be transparent unless CSD paints over them.
Electron already set the widget background to transparent for CSD windows, but it needed to apply the same correction to the root view behind web contents. The issue only became visible following #50007 because previous CSD frames happened to draw opaque titlebars or 1px borders that covered the exposed part of the root view.
Fixing this issue is also a prerequisite to support rounded corners on Linux: #51459. I originally included the fix in that PR, but it should be considered and backported separately since it fixes a visual glitch by itself.
Backport to 41.x, 42.x.
Checklist
npm testpassesRelease Notes
Notes: Fixed a bug on Linux where a 1px line appeared at the top of frameless windows if the window and web contents had different background colors.