From 878cc3fe826666d03107b4f04561f9563d9b347a Mon Sep 17 00:00:00 2001 From: akashnimare Date: Tue, 20 Jun 2017 15:19:57 +0530 Subject: [PATCH] focus window onclicking tray menus #fixes #183 --- app/renderer/js/tray.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/renderer/js/tray.js b/app/renderer/js/tray.js index cd928b94..c5b63005 100644 --- a/app/renderer/js/tray.js +++ b/app/renderer/js/tray.js @@ -117,6 +117,8 @@ const createTray = function () { const contextMenu = Menu.buildFromTemplate([{ label: 'About', click() { + // We need to focus the main window first + ipcRenderer.send('focus-app'); sendAction('open-about'); } }, @@ -135,6 +137,7 @@ const createTray = function () { { label: 'Manage Zulip servers', click() { + ipcRenderer.send('focus-app'); sendAction('open-settings'); } },