mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -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`,
|
`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 mainWindow = windowHandler.getMainWindow();
|
||||||
|
const mainWebContents = windowHandler.getMainWebContents();
|
||||||
if (mainWindow && !mainWindow.isDestroyed()) {
|
if (mainWindow && !mainWindow.isDestroyed()) {
|
||||||
if (isMac) {
|
if (isMac) {
|
||||||
logger.info(`main: We are on mac, so, showing the existing window`);
|
logger.info(`main: We are on mac, so, showing the existing window`);
|
||||||
@ -136,6 +137,9 @@ if (!allowMultiInstance) {
|
|||||||
mainWindow.focus();
|
mainWindow.focus();
|
||||||
isAppAlreadyOpen = true;
|
isAppAlreadyOpen = true;
|
||||||
protocolHandler.processArgv(argv, isAppAlreadyOpen);
|
protocolHandler.processArgv(argv, isAppAlreadyOpen);
|
||||||
|
if (mainWebContents && !mainWebContents.isDestroyed()) {
|
||||||
|
mainWebContents.focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
startApplication();
|
startApplication();
|
||||||
|
Loading…
Reference in New Issue
Block a user