fix: black window on screen capture when content protection is enabled#31340
Merged
VerteDinde merged 1 commit intoelectron:mainfrom Oct 11, 2021
Merged
fix: black window on screen capture when content protection is enabled#31340VerteDinde merged 1 commit intoelectron:mainfrom
VerteDinde merged 1 commit intoelectron:mainfrom
Conversation
zcbenz
approved these changes
Oct 11, 2021
|
Release Notes Persisted
|
This was referenced Oct 11, 2021
Contributor
|
I have automatically backported this PR to "15-x-y", please check out #31385 |
Contributor
|
I have automatically backported this PR to "16-x-y", please check out #31386 |
Contributor
|
/trop run backports |
Contributor
|
/trop run backport |
Contributor
|
The backport process for this PR has been manually initiated - here we go! :D |
This was referenced Oct 22, 2021
Contributor
|
I have automatically backported this PR to "13-x-y", please check out #31550 |
Contributor
|
I have automatically backported this PR to "14-x-y", please check out #31551 |
t57ser
pushed a commit
to t57ser/electron
that referenced
this pull request
Oct 27, 2021
electron#31340) Co-authored-by: Micha Hanselmann <mhanselmann@microsoft.com>
t57ser
pushed a commit
to t57ser/electron
that referenced
this pull request
Oct 27, 2021
electron#31340) Co-authored-by: Micha Hanselmann <mhanselmann@microsoft.com>
t57ser
pushed a commit
to t57ser/electron
that referenced
this pull request
Oct 29, 2021
electron#31340) Co-authored-by: Micha Hanselmann <mhanselmann@microsoft.com>
t57ser
pushed a commit
to t57ser/electron
that referenced
this pull request
Oct 29, 2021
electron#31340) Co-authored-by: Micha Hanselmann <mhanselmann@microsoft.com>
t57ser
pushed a commit
to t57ser/electron
that referenced
this pull request
Oct 29, 2021
electron#31340) Co-authored-by: Micha Hanselmann <mhanselmann@microsoft.com>
t57ser
pushed a commit
to t57ser/electron
that referenced
this pull request
Oct 29, 2021
electron#31340) Co-authored-by: Micha Hanselmann <mhanselmann@microsoft.com>
3 tasks
3 tasks
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
Closes #29085.
When screen sharing, BrowserWindows with enabled content protection should be transparent on supported Win 10 versions. However, after hiding and showing the window, Windows falls back to a black rectangle as known from the old
WDA_MONITORaffinity (thoughGetWindowDisplayAffinitystill returnsWDA_EXCLUDEFROMCAPTURE). This workaround mitigates the issue by setting theWS_EX_LAYEREDflag on the window.Please backport to v15 & v16.
Repro fiddle: https://gist.github.com/012544e8dbde6143d809dd82b201b236
Repro steps: run -> aux window will be hidden; press hide & show -> black/transparent rect
cc @codebytere @miniak @zarubond
Checklist
npm testpassesRelease Notes
Notes: Fixed black window when screen capturing a content-protected BrowserWindow on Windows 10.