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

Ensure DesktopCapturers are destroyed when no longer needed. #10223

Merged
merged 1 commit into from Aug 10, 2017

Conversation

Projects
None yet
2 participants
@ajmacd
Contributor

ajmacd commented Aug 8, 2017

After an app calls desktopCapturer.getSources on macOS, the screen sharing icon will appear on the lock screen until the app is closed:
mac-lock-screen-icon

This happens because we currently never destroy the desktop capturers that are created upon getSources. This change has NativeDesktopMediaList destroy them when its user indicates it is finished by returning false from OnRefreshFinished.

To see this occur, run the demo app in this repo on macOS:
https://github.com/ajmacd/desktop-capturer-demo

and check the lock screen after capturing the screen once. The screen share icon will be present until the app is killed. By replacing Electron with one built from this PR, the screen share icon is no longer present.

@zcbenz

zcbenz approved these changes Aug 10, 2017

👍

@zcbenz zcbenz merged commit c6289ef into electron:master Aug 10, 2017

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment