fix: improved the appearance of shadows and borders on frameless windows on Wayland#50007
Merged
jkleinsc merged 5 commits intoelectron:mainfrom Mar 11, 2026
Merged
Conversation
18af1db to
5a385b6
Compare
Member
Author
|
/request-review @ckerr |
Member
Member
|
@codebytere @mitchchn will review before EOD |
Member
Ugh, you'd think after doing this for as long as I have, I'd've learned to make promises I can't keep. Reviewing it now 😄 |
ckerr
reviewed
Mar 6, 2026
Remove unneeded virtual methods Co-authored-by: Charles Kerr <charles@charleskerr.com>
6 tasks
ckerr
approved these changes
Mar 9, 2026
…d-better-frameless-corners
jkleinsc
approved these changes
Mar 11, 2026
|
Release Notes Persisted
|
trop bot
added a commit
that referenced
this pull request
Mar 11, 2026
…ows on Wayland (#50007) * remove painting from linux frame layout * use chromium csd strategy for frameless windows * Apply suggestions from code review Remove unneeded virtual methods Co-authored-by: Charles Kerr <charles@charleskerr.com> * removed inline destructors --------- Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>
Contributor
|
I have automatically backported this PR to "41-x-y", please check out #50213 |
jkleinsc
pushed a commit
that referenced
this pull request
Mar 19, 2026
…ows on Wayland (#50213) fix: improved the appearance of shadows and borders on frameless windows on Wayland (#50007) * remove painting from linux frame layout * use chromium csd strategy for frameless windows * Apply suggestions from code review Remove unneeded virtual methods * removed inline destructors --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
#49295 introduced CSD for frameless windows on Wayland, but it didn't look quite right. The shadows did not extend to the top corners of the frame, they had the wrong intensity, and they didn't reflect active states in all desktop environments. This is because the
FrameProviderI used is intended to draw CSD for GTK frames with titlebars, not completely frameless windows.I added another strategy based on a different frame painter which is also used in Chromium. Electron now follows Chromium's pattern of selecting between different layout strategies (gtk frame provider, custom, base) depending on type of CSD and environment.
Longer term, we may want to write our own CSD painting strategy to handle Electron's use cases which differ somewhat from Chrome. But the overall layout architecture should be suitable going forward. This change also unblocks support for rounded corners on Linux, but that will come next.
(Apologies @ckerr for dropping this on you right after that huge PR you just looked at! Most of the LoC churn here is a re-organization of the new layout class to better line up with Chromium and to support different strategies.)
Before
After
Checklist
npm testpassesRelease Notes
Notes: Improved the appearance of shadows and borders on frameless windows on Wayland.