[MM-36309] Restore window menu, override shortcuts for window menu so they don't interfere (#1732)
This commit is contained in:
@@ -791,6 +791,12 @@ function initializeAfterAppReady() {
|
|||||||
globalShortcut.register(`${process.platform === 'darwin' ? 'Cmd+Ctrl' : 'Ctrl+Shift'}+S`, () => {
|
globalShortcut.register(`${process.platform === 'darwin' ? 'Cmd+Ctrl' : 'Ctrl+Shift'}+S`, () => {
|
||||||
ipcMain.emit(OPEN_TEAMS_DROPDOWN);
|
ipcMain.emit(OPEN_TEAMS_DROPDOWN);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (process.platform === 'linux') {
|
||||||
|
globalShortcut.registerAll(['Alt+F', 'Alt+E', 'Alt+V', 'Alt+H', 'Alt+W', 'Alt+P'], () => {
|
||||||
|
// do nothing because we want to supress the menu popping up
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -856,7 +862,6 @@ function handleCloseAppMenu() {
|
|||||||
function handleUpdateMenuEvent(event: IpcMainEvent, menuConfig: Config) {
|
function handleUpdateMenuEvent(event: IpcMainEvent, menuConfig: Config) {
|
||||||
const aMenu = appMenu.createMenu(menuConfig);
|
const aMenu = appMenu.createMenu(menuConfig);
|
||||||
Menu.setApplicationMenu(aMenu);
|
Menu.setApplicationMenu(aMenu);
|
||||||
WindowManager.removeWindowMenu();
|
|
||||||
aMenu.addListener('menu-will-close', handleCloseAppMenu);
|
aMenu.addListener('menu-will-close', handleCloseAppMenu);
|
||||||
|
|
||||||
// set up context menu for tray icon
|
// set up context menu for tray icon
|
||||||
|
@@ -554,7 +554,3 @@ function handleBrowserHistoryPush(e: IpcMainEvent, viewName: string, pathName: s
|
|||||||
export function getCurrentTeamName() {
|
export function getCurrentTeamName() {
|
||||||
return status.currentServerName;
|
return status.currentServerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function removeWindowMenu() {
|
|
||||||
status.mainWindow?.removeMenu();
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user