mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-27 01:11:13 -06:00
SDA-4206 Set alwaysOnTop and skipTaskbar post hiding main window
This commit is contained in:
parent
5b3e9f87bb
commit
b63b44bd0e
@ -68,6 +68,7 @@ export class WindowStore {
|
||||
|
||||
public restoreWindows = (hideOnCapture?: boolean) => {
|
||||
if (hideOnCapture) {
|
||||
this.restoreNotificationProperties();
|
||||
const storedWindows = this.getWindowStore();
|
||||
let currentWindow = storedWindows.windows.find(
|
||||
(currentWindow) => currentWindow.focused,
|
||||
@ -132,6 +133,25 @@ export class WindowStore {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user