Skip to content

feat: add support for preventing the system context menu - #25795

Merged
MarshallOfSound merged 1 commit into
masterfrom
system-context-menu-prevent
Oct 8, 2020
Merged

MarshallOfSound merged 1 commit into
masterfrom
system-context-menu-prevent

Conversation

@MarshallOfSound

@MarshallOfSound MarshallOfSound commented Oct 6, 2020 •

Copy link
Copy Markdown
Member

Docs explain this well enough hopefully, basically there is a menu that appears when you right click on the non-client area of your app. This event lets you prevent that menu appearing and passes the coordinates so you can in theory replace it with your own menu if you wanted.

Pretty standard event wiring, nothing new here.

Notes: Added new system-context-menu event to allow preventing and overriding the system context menu

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Oct 6, 2020
@samuelmaddock

Copy link
Copy Markdown
Member

Does this also prevent the menu from appearing when pressing the Alt + Space hotkey?

@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Oct 7, 2020
@MarshallOfSound

Copy link
Copy Markdown
Member Author

Does this also prevent the menu from appearing when pressing the Alt + Space hotkey?

Unfortunately not, I can't seem to use wndproc to prevent that

@samuelmaddock

Copy link
Copy Markdown
Member

Does this also prevent the menu from appearing when pressing the Alt + Space hotkey?

Unfortunately not, I can't seem to use wndproc to prevent that

I've never seen a windowed app override that behavior, likely for accessibility reasons, so that's fine. I was mostly just curious whether that would be affected.

@MarshallOfSound
MarshallOfSound merged commit 6d5cf02 into master Oct 8, 2020
@release-clerk

release-clerk Bot commented Oct 8, 2020

Copy link
Copy Markdown

Release Notes Persisted

Added new system-context-menu event to allow preventing and overriding the system context menu

@MarshallOfSound
MarshallOfSound deleted the system-context-menu-prevent branch October 8, 2020 22:45
@trop

trop Bot commented Oct 8, 2020

Copy link
Copy Markdown
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants