Electron-175 - Method to set AlwaysOnTop property for about window

This commit is contained in:
Kiran Niranjan 2017-10-11 20:58:32 +05:30 committed by Kiran Niranjan
parent 89e823823e
commit 837d0dc265

View File

@ -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();
});