Skip to content

fix: don't treat transparent overlays as occluders on macOS - #52365

Merged
VerteDinde merged 2 commits into
mainfrom
fix-mac-occlusion-transparent-overlay
Jul 18, 2026
Merged

VerteDinde merged 2 commits into
mainfrom
fix-mac-occlusion-transparent-overlay

Conversation

@VerteDinde

Copy link
Copy Markdown
Member

Description of Change

Fixes #51718.

Since #50579 re-enabled MacWebContentsOcclusion, Chromium's manual occlusion heuristic (active on macOS 13.3–25.x) marks a window occluded whenever a visible window above it fully contains its frame. It never looks at window opacity, so a transparent: true + setIgnoreMouseEvents(true) overlay flips the window beneath it to visibilityState = 'hidden' and triggers background throttling even though its content is fully visible.

This adds a Chromium patch that skips candidate occluders that can't visually cover anything — faded windows (alphaValue < 1), click-through windows, and non-opaque windows without an opaque background — mirroring how the Windows occlusion tracker filters WS_EX_TRANSPARENT and translucent layered windows. The #45776 hidden-then-shown fix from #50579 is untouched.

Checklist

Release Notes

Notes: Fixed a window being marked hidden and background-throttled on macOS when covered by a transparent or click-through window.

Chromium's manual occlusion heuristic (macOS 13.3-25.x) only compares
window frames, so a transparent or click-through window covering
another BrowserWindow marked the covered window occluded, flipping its
visibilityState to hidden and throttling it. Skip candidate occluders
that are faded, ignore mouse events, or are non-opaque without an
opaque background.
@VerteDinde VerteDinde 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 Jul 16, 2026
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Jul 16, 2026
@VerteDinde
VerteDinde marked this pull request as ready for review July 16, 2026 19:56
@VerteDinde
VerteDinde requested a review from a team as a code owner July 16, 2026 19:56

@codebytere codebytere 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.

@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Jul 17, 2026
@VerteDinde
VerteDinde enabled auto-merge (squash) July 18, 2026 04:55
@VerteDinde
VerteDinde merged commit 06757fd into main Jul 18, 2026
72 of 73 checks passed
@VerteDinde
VerteDinde deleted the fix-mac-occlusion-transparent-overlay branch July 18, 2026 06:58
@release-clerk

release-clerk Bot commented Jul 18, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed a window being marked hidden and background-throttled on macOS when covered by a transparent or click-through window.

@trop

trop Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

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

@trop trop Bot removed the target/43-x-y PR should also be added to the "43-x-y" branch. label Jul 18, 2026
@trop

trop Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

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

@trop trop Bot removed target/42-x-y PR should also be added to the "42-x-y" branch. target/44-x-y PR should also be added to the "44-x-y" branch. labels Jul 18, 2026
@trop trop Bot added 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. merged/42-x-y PR was merged to the "42-x-y" branch. and removed in-flight/44-x-y in-flight/43-x-y in-flight/42-x-y labels Jul 20, 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.

[Bug] Transparent click-through overlay causes underlying window to be marked hidden on macOS

2 participants