Skip to content

fix: window content protection on older Windows versions #47856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2025

Conversation

codebytere
Copy link
Member

Description of Change

Closes #47834

We need to bring back the initial solution from #31340 - it looks like the black window issue has gone away but there remain issues with capture on older OSes where calling SetWindowDisplayAffinity on windows without WS_EX_LAYERED will expose the window.

Checklist

Release Notes

Notes: Fixed an issue on some older Windows versions where setContentProtection didn't work as expected.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/36-x-y PR should also be added to the "36-x-y" branch. target/37-x-y PR should also be added to the "37-x-y" branch. target/38-x-y PR should also be added to the "38-x-y" branch. labels Jul 22, 2025
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jul 22, 2025
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jul 23, 2025
@deepak1556
Copy link
Member

Build failures on linux are related.

@codebytere codebytere force-pushed the fix-content-protection-layered branch from 50adbe0 to eca4fa6 Compare July 23, 2025 12:21
@codebytere codebytere force-pushed the fix-content-protection-layered branch from eca4fa6 to fe4c02d Compare July 23, 2025 14:45
@codebytere codebytere requested a review from deepak1556 July 23, 2025 15:41
@codebytere codebytere force-pushed the fix-content-protection-layered branch from fe4c02d to 18280ca Compare July 23, 2025 15:41
@VerteDinde VerteDinde merged commit 01faaa3 into main Jul 24, 2025
57 checks passed
@VerteDinde VerteDinde deleted the fix-content-protection-layered branch July 24, 2025 19:05
@release-clerk
Copy link

release-clerk bot commented Jul 24, 2025

Release Notes Persisted

Fixed an issue on some older Windows versions where setContentProtection didn't work as expected.

@trop
Copy link
Contributor

trop bot commented Jul 24, 2025

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

@trop trop bot removed the target/38-x-y PR should also be added to the "38-x-y" branch. label Jul 24, 2025
@trop
Copy link
Contributor

trop bot commented Jul 24, 2025

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

@trop
Copy link
Contributor

trop bot commented Jul 24, 2025

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

@trop trop bot added in-flight/36-x-y merged/36-x-y PR was merged to the "36-x-y" branch. merged/38-x-y PR was merged to the "38-x-y" branch. merged/37-x-y PR was merged to the "37-x-y" branch. and removed target/37-x-y PR should also be added to the "37-x-y" branch. target/36-x-y PR should also be added to the "36-x-y" branch. in-flight/36-x-y in-flight/38-x-y in-flight/37-x-y labels Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/36-x-y PR was merged to the "36-x-y" branch. merged/37-x-y PR was merged to the "37-x-y" branch. merged/38-x-y PR was merged to the "38-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BrowserWindow with setContentProtection(true) captured on some Windows OSs
3 participants