diff --git a/src/main/index.ts b/src/main/index.ts index 756b09d..9f26621 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -104,6 +104,12 @@ app.whenReady().then(() => { tray.setIgnoreDoubleClickEvents(true) const contextMenu = Menu.buildFromTemplate([ + ...(process.platform === 'darwin' ? [{ + label: 'Show', + click: _ => { + mainWindow.show() + } + }] : []), { label: 'Hide', click: _ => { @@ -118,14 +124,16 @@ app.whenReady().then(() => { } }, ]) - tray.setToolTip('Umbra') + tray.setToolTip(app.getName()) tray.setContextMenu(contextMenu) // Prevent menu from being shown on left click // Instead make main window visible (if it had been invisible) - tray.on('click', _ => { - mainWindow.show() - }) + if (process.platform !== 'darwin') { + tray.on('click', _ => { + mainWindow.show() + }) + } ipcMain.handle('game:insert', async (_, game: Game) => {