mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-4206 Set alwaysOnTop and skipTaskbar post hiding main window
This commit is contained in:
committed by
Salah Benmoussati
parent
b3edd7b935
commit
281d12baee
@@ -67,6 +67,7 @@ export class WindowStore {
|
||||
|
||||
public restoreWindows = (hideOnCapture?: boolean) => {
|
||||
if (hideOnCapture) {
|
||||
this.restoreNotificationProperties();
|
||||
const storedWindows = this.getWindowStore();
|
||||
let currentWindow = storedWindows.windows.find(
|
||||
(currentWindow) => currentWindow.focused,
|
||||
@@ -122,12 +123,30 @@ export class WindowStore {
|
||||
mainWindow?.setThumbarButtons(items);
|
||||
logger.info('window-store: restoring thumbnail toolbar buttons');
|
||||
}
|
||||
|
||||
// Store reset
|
||||
this.destroyWindowStore();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Restores notification properties reset to default post hiding main window
|
||||
* @param windowsNames
|
||||
*/
|
||||
private restoreNotificationProperties = () => {
|
||||
const windows = BrowserWindow.getAllWindows();
|
||||
|
||||
windows
|
||||
.filter(
|
||||
(window) =>
|
||||
(window as ICustomBrowserWindow).winName ===
|
||||
apiName.notificationWindowName,
|
||||
)
|
||||
.map((notificationWindow) => {
|
||||
notificationWindow.setAlwaysOnTop(true);
|
||||
notificationWindow.setSkipTaskbar(true);
|
||||
});
|
||||
};
|
||||
|
||||
private hideFullscreenWindow = (window: BrowserWindow) => {
|
||||
window.once('leave-full-screen', () => {
|
||||
if (isMac) {
|
||||
|
||||
Reference in New Issue
Block a user