feat: support system-context-menu
on Linux (#45848)
feat: support system-context-menu on Linux
This commit is contained in:
parent
77833eddfb
commit
5da75c4a97
3 changed files with 46 additions and 7 deletions
|
@ -342,12 +342,12 @@ Emitted when the window has closed a sheet.
|
|||
|
||||
Emitted when the native new tab button is clicked.
|
||||
|
||||
#### Event: 'system-context-menu' _Windows_
|
||||
#### Event: 'system-context-menu' _Windows_ _Linux_
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `point` [Point](structures/point.md) - The screen coordinates the context menu was triggered at
|
||||
* `point` [Point](structures/point.md) - The screen coordinates where the context menu was triggered.
|
||||
|
||||
Emitted when the system context menu is triggered on the window, this is
|
||||
normally only triggered when the user right clicks on the non-client area
|
||||
|
@ -356,6 +356,8 @@ as `-webkit-app-region: drag` in a frameless window.
|
|||
|
||||
Calling `event.preventDefault()` will prevent the menu from being displayed.
|
||||
|
||||
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows).
|
||||
|
||||
### Static Methods
|
||||
|
||||
The `BaseWindow` class has the following static methods:
|
||||
|
|
|
@ -421,12 +421,12 @@ Emitted when the window has closed a sheet.
|
|||
|
||||
Emitted when the native new tab button is clicked.
|
||||
|
||||
#### Event: 'system-context-menu' _Windows_
|
||||
#### Event: 'system-context-menu' _Windows_ _Linux_
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `point` [Point](structures/point.md) - The screen coordinates the context menu was triggered at
|
||||
* `point` [Point](structures/point.md) - The screen coordinates where the context menu was triggered.
|
||||
|
||||
Emitted when the system context menu is triggered on the window, this is
|
||||
normally only triggered when the user right clicks on the non-client area
|
||||
|
@ -435,6 +435,8 @@ as `-webkit-app-region: drag` in a frameless window.
|
|||
|
||||
Calling `event.preventDefault()` will prevent the menu from being displayed.
|
||||
|
||||
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows).
|
||||
|
||||
### Static Methods
|
||||
|
||||
The `BrowserWindow` class has the following static methods:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue