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: user-did-{resign|become}-active events on macOS #41506

Merged
merged 1 commit into from Mar 6, 2024

Conversation

codebytere
Copy link
Member

Description of Change

Closes #41497.

Fixes an issue where user-did-{resign|become}-active were not emitted properly on macOS.

This was happening because per docs the notification object is the shared NSWorkspace instance - we need to add an observer to [[NSWorkspace sharedWorkspace] notificationCenter] and not [NSDistributedNotificationCenter defaultCenter].

Checklist

Release Notes

Notes: Fixed an issue where user-did-{resign|become}-active were not emitted properly on macOS.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/28-x-y PR should also be added to the "28-x-y" branch. target/29-x-y PR should also be added to the "29-x-y" branch. target/30-x-y PR should also be added to the "30-x-y" branch. labels Mar 4, 2024
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Mar 4, 2024
@brondibur
Copy link

Hi @codebytere
Thanks for jumping on this super quickly. I noticed the 26-x-y labels are missing from both the issue and the PR.
On https://www.electronjs.org/docs/latest/tutorial/electron-timelines I see a green checkmark for Electron v26, but EOL date is Feb 20, 2024.
Does this mean the fix won't be available for Electron v26? What about Electron v27?

@codebytere
Copy link
Member Author

@brondibur unfortunately no - we maintain four release lines at any given time, with the oldest being primarily security-related fixes. I've opened a PR to correct the doc.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 5, 2024
@codebytere codebytere merged commit a7d664e into main Mar 6, 2024
27 of 28 checks passed
@codebytere codebytere deleted the fix-fast-switching branch March 6, 2024 11:43
Copy link

release-clerk bot commented Mar 6, 2024

Release Notes Persisted

Fixed an issue where user-did-{resign|become}-active were not emitted properly on macOS.

@trop
Copy link
Contributor

trop bot commented Mar 6, 2024

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

@trop trop bot added in-flight/28-x-y and removed target/28-x-y PR should also be added to the "28-x-y" branch. labels Mar 6, 2024
@trop
Copy link
Contributor

trop bot commented Mar 6, 2024

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

@trop
Copy link
Contributor

trop bot commented Mar 6, 2024

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

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

Successfully merging this pull request may close these issues.

[Bug]: MacOS powerMonitor events don't detect fast user switching
3 participants