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: Fn+F fullscreen transitioning on macOS #37803

Merged
merged 1 commit into from Apr 4, 2023

Conversation

codebytere
Copy link
Member

@codebytere codebytere commented Apr 3, 2023

Description of Change

Closes #37761.

Fixes an issue on macOS where entering fullscreen with the Fn+F system shortcut would fail or create strange window side effects. This was happening as a result of https://chromium-review.googlesource.com/c/chromium/src/+/3496322, which changed the logic in content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm to sent the keyboard shortcut directly to the NSMenu instance if the keyboard event is a system shortcut.

In combination with our own logic in WebContents::PlatformHandleKeyboardEvent, this meant that the BrowserWindow would be incorrectly sent two calls to toggleFullScreenMode. We prevent this by ensuring that system keyboard shortcuts are only sent to the NSMenu instance once.

Checklist

Release Notes

Notes: Fixes an issue on macOS where entering fullscreen with the Fn+F system shortcut would fail or create strange window side effects.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/23-x-y PR should also be added to the "23-x-y" branch. target/24-x-y PR should also be added to the "24-x-y" branch. labels Apr 3, 2023
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Apr 3, 2023
@codebytere codebytere requested a review from zcbenz April 4, 2023 08:27
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Apr 4, 2023
@codebytere codebytere merged commit 3f42040 into main Apr 4, 2023
16 checks passed
@codebytere codebytere deleted the fix-fullscreen-double-send branch April 4, 2023 13:17
@release-clerk
Copy link

release-clerk bot commented Apr 4, 2023

Release Notes Persisted

Fixes an issue on macOS where entering fullscreen with the Fn+F system shortcut would fail or create strange window side effects.

@trop
Copy link
Contributor

trop bot commented Apr 4, 2023

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

@trop trop bot added the in-flight/23-x-y label Apr 4, 2023
@trop
Copy link
Contributor

trop bot commented Apr 4, 2023

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

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

Successfully merging this pull request may close these issues.

[Bug]: After entering and exiting full screen, app can't quit
2 participants