mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -06:00
SDA-4251 - Workaround to fix always on top issue (#1932)
Signed-off-by: Kiran Niranjan <kiran.niranjan@symphony.com>
This commit is contained in:
parent
28650d9c5d
commit
59d02c7dd6
@ -597,6 +597,20 @@ export class WindowHandler {
|
|||||||
MAIN_WEB_CONTENTS_EVENTS,
|
MAIN_WEB_CONTENTS_EVENTS,
|
||||||
this.mainWebContents,
|
this.mainWebContents,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// workaround for https://perzoinc.atlassian.net/browse/SDA-4251
|
||||||
|
this.mainWindow?.on('focus', () => {
|
||||||
|
const { alwaysOnTop } = config.getConfigFields(['alwaysOnTop']);
|
||||||
|
logger.info('window-handler: main window focused', alwaysOnTop);
|
||||||
|
if (
|
||||||
|
alwaysOnTop === CloudConfigDataTypes.ENABLED &&
|
||||||
|
this.mainWindow &&
|
||||||
|
windowExists(this.mainWindow)
|
||||||
|
) {
|
||||||
|
this.mainWindow.setAlwaysOnTop(false);
|
||||||
|
this.mainWindow.setAlwaysOnTop(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user