From 837d0dc265788280a1a4a90b23c4f183210d7500 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Wed, 11 Oct 2017 20:58:32 +0530 Subject: [PATCH] Electron-175 - Method to set AlwaysOnTop property for about window --- js/aboutApp/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/aboutApp/index.js b/js/aboutApp/index.js index 68888292..3181bb92 100644 --- a/js/aboutApp/index.js +++ b/js/aboutApp/index.js @@ -67,6 +67,13 @@ function openAboutWindow(windowName) { aboutWindow.setVisibleOnAllWorkspaces(true); aboutWindow.loadURL(getTemplatePath()); + // sets the AlwaysOnTop property for the about window + // if the main window's AlwaysOnTop is true + let focusedWindow = BrowserWindow.getFocusedWindow(); + if (focusedWindow && focusedWindow.isAlwaysOnTop()) { + aboutWindow.setAlwaysOnTop(true); + } + aboutWindow.once('ready-to-show', () => { aboutWindow.show(); });