Repository navigation
fix: disable kWindowCaptureMacV2 for desktop capturer - #30507
Merged
Merged
Conversation
VerteDinde
force-pushed
the
29458-mac-desktop-capture-id
branch
2 times, most recently
from
August 11, 2021 23:40
f517d38 to
78797cf
Compare
VerteDinde
force-pushed
the
29458-mac-desktop-capture-id
branch
from
August 12, 2021 02:13
78797cf to
92b3da9
Compare
zcbenz
approved these changes
Aug 13, 2021
|
Release Notes Persisted
|
This was referenced Aug 13, 2021
Contributor
|
I have automatically backported this PR to "13-x-y", please check out #30523 |
Contributor
|
I have automatically backported this PR to "14-x-y", please check out #30524 |
Contributor
|
I have automatically backported this PR to "15-x-y", please check out #30525 |
miniak
pushed a commit
that referenced
this pull request
Aug 18, 2021
BlackHole1
pushed a commit
to BlackHole1/electron
that referenced
this pull request
Aug 30, 2021
|
is there any settings on linux, my linux electron app screenshot black screen, mac is ok |
3 of 4 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
Fixes #29458
When trying to screen capture an Electron application's own window, the screen will show as blank. This is because when
kWindowCaptureMacV2is enabled, the latter portion of the DesktopMediaID is incorrectly replaced. For example: the DesktopMediaID is changed fromwindow:626:0(correct) towindow:626:626(incorrect). Passing the incorrect id into the desktop capture API results in the window not being found, and a blank or default-colored screen.kWindowCaptureMacV2is already disabled by default in upstream Chromium (see here: https://chromium-review.googlesource.com/c/chromium/src/+/3069272). This PR also disables the feature by default until the upstream fix is in main. It also adds a new desktop capture test to keep the issue from happening again.Checklist
npm testpassesRelease Notes
Notes: Fixed an issue on Mac where an application could not capture its own window using the desktop capture or getMediaSourceId APIs.