Skip to content

fix: remove shadow artifacts that appear when multiple windows are created on Linux - #52584

Merged
deepak1556 merged 1 commit into
electron:mainfrom
mitchchn:mitch/fix-shadow-artifact-linux
Aug 3, 2026
Merged

deepak1556 merged 1 commit into
electron:mainfrom
mitchchn:mitch/fix-shadow-artifact-linux

Conversation

@mitchchn

@mitchchn mitchchn commented Aug 1, 2026 •

Copy link
Copy Markdown
Member

Description of Change

Resolves #51456.

Prevents Aura from applying its own drop shadows to windows, since modern versions of Electron and Chrome draw shadows directly on the frame or with DWM.

The Aura shadow manager was vestigial in Electron. All it was doing was producing subtle graphical glitches for additional windows created after first, due to a race where the controller only fully initialized after the first window was created.

This change applies to both Linux and Windows. At first I was confused about the impact on Windows, because there is no other code left in Electron to control shadows on the platform. On further investigation I discovered that hasShadow does not function on Windows already, and it seems it has not worked for a long time if ever (I tested back to Electron 37). So I thought it would be best to remove the dead code and look into a solution for Windows separately: #52583.

Checklist

Release Notes

Notes: Fixed a graphical glitch on Linux where thin borders appeared past the drop shadows on frameless windows when multiple windows were created.

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Aug 1, 2026
@mitchchn mitchchn changed the title fix: remove shadow artifact with multiple windows on Linux fix: remove shadow artifacts that appear when multiple windows are created on Linux Aug 1, 2026

@deepak1556 deepak1556 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Comment thread shell/browser/native_window_views.cc Resolved
@deepak1556 deepak1556 added semver/patch backwards-compatible bug fixes target/42-x-y PR should also be added to the "42-x-y" branch. 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. labels Aug 2, 2026
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Aug 2, 2026
@deepak1556
deepak1556 merged commit 41bb886 into electron:main Aug 3, 2026
93 checks passed
@release-clerk

release-clerk Bot commented Aug 3, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed a graphical glitch on Linux where thin borders appeared past the drop shadows on frameless windows when multiple windows were created.

@trop

trop Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "42-x-y" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

@github-actions github-actions Bot added the 45-x-y label Aug 3, 2026
@trop

trop Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

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

@trop trop Bot added in-flight/44-x-y in-flight/43-x-y merged/44-x-y PR was merged to the "44-x-y" branch. merged/43-x-y PR was merged to the "43-x-y" branch. and removed target/44-x-y PR should also be added to the "44-x-y" branch. target/43-x-y PR should also be added to the "43-x-y" branch. in-flight/44-x-y in-flight/43-x-y labels Aug 3, 2026
@trop

trop Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@mitchchn has manually backported this PR to "42-x-y", please check out #52772

mitchchn added a commit to mitchchn/electron that referenced this pull request Aug 13, 2026
…eated on Linux (electron#52584)

fix: remove shadow artifact with multiple windows on Linux
MarshallOfSound pushed a commit that referenced this pull request Aug 16, 2026
#52772)

fix: remove shadow artifacts that appear when multiple windows are created on Linux (#52584)

fix: remove shadow artifact with multiple windows on Linux
@trop trop Bot added merged/42-x-y PR was merged to the "42-x-y" branch. and removed in-flight/42-x-y labels Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

45-x-y merged/42-x-y PR was merged to the "42-x-y" branch. 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. semver/patch backwards-compatible bug fixes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Create a window before creating a frameless window on Wayland brings a strange border around shadows

3 participants