mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-29 02:11:28 -06:00
SDA-3516 - Focus main webContents (#1321)
This commit is contained in:
parent
312af153ca
commit
4f59a4694d
@ -124,6 +124,7 @@ if (!allowMultiInstance) {
|
||||
`main: We've got a second instance of the app, will check if it's allowed and exit if not`,
|
||||
);
|
||||
const mainWindow = windowHandler.getMainWindow();
|
||||
const mainWebContents = windowHandler.getMainWebContents();
|
||||
if (mainWindow && !mainWindow.isDestroyed()) {
|
||||
if (isMac) {
|
||||
logger.info(`main: We are on mac, so, showing the existing window`);
|
||||
@ -136,6 +137,9 @@ if (!allowMultiInstance) {
|
||||
mainWindow.focus();
|
||||
isAppAlreadyOpen = true;
|
||||
protocolHandler.processArgv(argv, isAppAlreadyOpen);
|
||||
if (mainWebContents && !mainWebContents.isDestroyed()) {
|
||||
mainWebContents.focus();
|
||||
}
|
||||
}
|
||||
});
|
||||
startApplication();
|
||||
|
Loading…
Reference in New Issue
Block a user