mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
ELECTRON-955 fixing toast notification does not show on top of the Electron after it is minimized and maximized again (#534)
This commit is contained in:
parent
3850bc9b2f
commit
8ca8db65ed
@ -121,6 +121,25 @@ function createMainWindow(initialUrl) {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ELECTRON-955: Always on Top - Toast notification does not show on top (front) of the Electron app after it is minimized and maximized again
|
||||
* Bring to front all notification windows
|
||||
*/
|
||||
function bringToFrontNotification() {
|
||||
if (mainWindow && !mainWindow.isDestroyed()) {
|
||||
let allBrowserWindows = BrowserWindow.getAllWindows();
|
||||
const notificationWindow = allBrowserWindows.filter((item) => item.winName === 'notification-window');
|
||||
if (mainWindow.isAlwaysOnTop()) {
|
||||
notificationWindow.forEach((item) => {
|
||||
if (item && !item.isDestroyed()) {
|
||||
item.setAlwaysOnTop(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates the main window with bounds
|
||||
* @param initialUrl
|
||||
@ -758,6 +777,7 @@ function saveMainWinBounds() {
|
||||
if (mainWindow && !mainWindow.isDestroyed()) {
|
||||
newBounds.isMaximized = mainWindow.isMaximized();
|
||||
newBounds.isFullScreen = mainWindow.isFullScreen();
|
||||
bringToFrontNotification();
|
||||
}
|
||||
|
||||
if (newBounds) {
|
||||
|
Loading…
Reference in New Issue
Block a user