From c6b0d96165f89ecca93064131fdecbef44f1d520 Mon Sep 17 00:00:00 2001 From: AmarB Date: Sat, 20 Jul 2019 17:56:14 -0400 Subject: [PATCH] hide main window by clicking system trey --- src/main/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/index.js b/src/main/index.js index 10270c7..ad50f90 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -82,7 +82,7 @@ function createTray() { tray.setToolTip('Pomotroid\nClick to Restore') tray.setContextMenu(Menu.buildFromTemplate([{ role: 'quit' }])) tray.on('click', () => { - mainWindow.show() + mainWindow.isVisible() ? mainWindow.hide() : mainWindow.show() }) tray.on('right-click', () => { tray.popUpContextMenu()