Skip to content
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

fix: duplicate suspend/resume events #24818

Merged
merged 1 commit into from Aug 5, 2020
Merged

fix: duplicate suspend/resume events #24818

merged 1 commit into from Aug 5, 2020

Conversation

@codebytere
Copy link
Member

codebytere commented Aug 3, 2020

Description of Change

Closes #24803.

Switches to use NSDistributedNotificationCenter, as using [[[NSWorkspace sharedWorkspace] notificationCenter] cause the events to be emitted twice.

Before:

Screen Shot 2020-08-03 at 11 58 04 AM

After:

Screen Shot 2020-08-03 at 11 57 47 AM

Tested with https://gist.github.com/e498427e185c11ac5d81e3bd0fb6dc72

Checklist

Release Notes

Notes: Fixed an issue where suspend/resume were emitted twice on macOS.

Copy link
Member

nornagon left a comment

weird, but ok

@zcbenz
zcbenz approved these changes Aug 4, 2020
@electron-cation electron-cation bot removed the new-pr 🌱 label Aug 4, 2020
@codebytere codebytere merged commit 06c47c6 into master Aug 5, 2020
16 of 18 checks passed
16 of 18 checks passed
build-mac Workflow: build-mac
Details
electron-woa-testing Build #20200803.4 failed
Details
Artifact Comparison No Changes
Details
Backportable? - 10-x-y Clean Backport
Details
Backportable? - 8-x-y Clean Backport
Details
Backportable? - 9-x-y Clean Backport
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-woa-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
electron-arm-testing Build #20200803.5 succeeded
Details
electron-arm64-testing Build #20200803.5 succeeded
Details
lint Workflow: lint
Details
release-notes Release notes found
@release-clerk
Copy link

release-clerk bot commented Aug 5, 2020

Release Notes Persisted

Fixed an issue where suspend/resume were emitted twice on macOS.

@trop
Copy link
Contributor

trop bot commented Aug 5, 2020

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

@trop
Copy link
Contributor

trop bot commented Aug 5, 2020

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

@trop
Copy link
Contributor

trop bot commented Aug 5, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.