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: overzealous media key listening on Windows #34594

Merged
merged 1 commit into from Jun 20, 2022
Merged

Conversation

codebytere
Copy link
Member

Description of Change

Closes #32385.

Fixes an issue where media keys would be sent to Electron on Windows no matter which window was in focus. This is fixed by only adding a ui::MediaKeysListener on either systems that don't support SystemMediaControls (e.g. Windows 7/8) or macOS, since that's necessary to ensure proper functionality of globalShortcuts on macOS.

Checklist

Release Notes

Notes: Fixed an issue where media keys would be sent to Electron on Windows no matter which window was in focus.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/18-x-y labels Jun 16, 2022
@codebytere codebytere requested review from a team as code owners June 16, 2022 10:24
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jun 16, 2022
Copy link
Member

@VerteDinde VerteDinde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with the repro case on Windows and it works! 👍

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jun 17, 2022
@zcbenz zcbenz merged commit 6e9466f into main Jun 20, 2022
@zcbenz zcbenz deleted the fix-media-keys-windows branch June 20, 2022 10:40
@release-clerk
Copy link

release-clerk bot commented Jun 20, 2022

Release Notes Persisted

Fixed an issue where media keys would be sent to Electron on Windows no matter which window was in focus.

@trop
Copy link
Contributor

trop bot commented Jun 20, 2022

I was unable to backport this PR to "18-x-y" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jun 20, 2022

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

@trop
Copy link
Contributor

trop bot commented Jun 20, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: BrowserView holds onto media keys in Windows 10 when media is being played from BrowserView
4 participants