mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Set x, y context menu position explicitly
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
ed940cbfac
commit
a9b6bb90f7
@ -152,7 +152,13 @@ export function initIpcMainHandlers() {
|
|||||||
|
|
||||||
ipcMainOn(IpcMainWindowEvents.OPEN_CONTEXT_MENU, async (event) => {
|
ipcMainOn(IpcMainWindowEvents.OPEN_CONTEXT_MENU, async (event) => {
|
||||||
const menu = Menu.buildFromTemplate(getAppMenu(WindowManager.getInstance()));
|
const menu = Menu.buildFromTemplate(getAppMenu(WindowManager.getInstance()));
|
||||||
|
const options = {
|
||||||
|
...BrowserWindow.fromWebContents(event.sender),
|
||||||
|
// Center of the topbar menu icon
|
||||||
|
x: 20,
|
||||||
|
y: 20,
|
||||||
|
} as Electron.PopupOptions;
|
||||||
|
|
||||||
menu.popup(BrowserWindow.fromWebContents(event.sender) as Electron.PopupOptions);
|
menu.popup(options);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user