Repository navigation
fix: system-context-menu with frameless BrowserWindows - #43243
Merged
Merged
Conversation
codebytere
force-pushed
the
fix-prevent-default-menu-win
branch
from
August 7, 2024 09:50
a932960 to
f35b7bb
Compare
system-context-menu with frameless windows|
Recommend closing #24893 as well, related issue. See #24893 (comment) |
MarshallOfSound
approved these changes
Aug 7, 2024
ckerr
approved these changes
Aug 8, 2024
|
Release Notes Persisted
|
Contributor
|
I have automatically backported this PR to "32-x-y", please check out #43269 |
Member
Author
|
/trop run backport-to 31-x-y,30-x-y |
Contributor
|
The backport process for this PR has been manually initiated - sending your PR to |
Contributor
|
The backport process for this PR has been manually initiated - sending your PR to |
Contributor
|
I have automatically backported this PR to "31-x-y", please check out #43274 |
Contributor
|
I have automatically backported this PR to "30-x-y", please check out #43275 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Closes #37614
Closes #26726
Closes #24893
Fixes an issue where
system-context-menuwas not triggered as expected on Windows when using a frameless BrowserWindow. As noted by @ckerr in the above issue, Electron never sees theWM_CONTEXTMENUmessage becausehwnd_message_handler.ccuses its own custom event handling forWM_RBUTTONUP. We can fix this by intercepting it inNativeWindowViews::PreHandleMSG, as suggested here by @eXhumer. Confirmed to address the issue with a local build and test.Checklist
npm testpassesRelease Notes
Notes: Fixed an issue where
system-context-menuwas not triggered as expected on Windows when using a frameless BrowserWindow.