mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-4417 - Move focus listener outside did-finish-load and use window property instead of config for AlwaysOnTop (#2031)
This commit is contained in:
parent
bc4d85c646
commit
06368d8e7b
@ -638,20 +638,18 @@ export class WindowHandler {
|
|||||||
MAIN_WEB_CONTENTS_EVENTS,
|
MAIN_WEB_CONTENTS_EVENTS,
|
||||||
this.mainWebContents,
|
this.mainWebContents,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// workaround for https://perzoinc.atlassian.net/browse/SDA-4251
|
// workaround for https://perzoinc.atlassian.net/browse/SDA-4251
|
||||||
this.mainWindow?.on('focus', () => {
|
this.mainWindow?.on('focus', () => {
|
||||||
const { alwaysOnTop } = config.getConfigFields(['alwaysOnTop']);
|
if (
|
||||||
logger.info('window-handler: main window focused', alwaysOnTop);
|
this.mainWindow &&
|
||||||
if (
|
windowExists(this.mainWindow) &&
|
||||||
alwaysOnTop === CloudConfigDataTypes.ENABLED &&
|
this.mainWindow.isAlwaysOnTop()
|
||||||
this.mainWindow &&
|
) {
|
||||||
windowExists(this.mainWindow)
|
this.mainWindow.setAlwaysOnTop(false);
|
||||||
) {
|
this.mainWindow.setAlwaysOnTop(true);
|
||||||
this.mainWindow.setAlwaysOnTop(false);
|
|
||||||
this.mainWindow.setAlwaysOnTop(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user