SDA-4604 Limiting window activation change to macOS for bring-to-front feature only (#2176) (#2177)

This commit is contained in:
Salah Benmoussati 2024-07-18 12:33:23 +02:00 committed by GitHub
parent 6d6818548a
commit e543476c38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 5 deletions

View File

@ -340,7 +340,7 @@ describe('main api handler', () => {
reason: 'notification',
windowName: 'notification',
};
const expectedValue = ['notification'];
const expectedValue = ['notification', false];
ipcMain.send(apiName.symphonyApi, value);
expect(spy).toBeCalledWith(...expectedValue);
});

View File

@ -207,7 +207,7 @@ ipcMain.on(
if (typeof arg.reason === 'string' && arg.reason === 'notification') {
const { bringToFront } = config.getConfigFields(['bringToFront']);
if (bringToFront === CloudConfigDataTypes.ENABLED) {
activate(arg.windowName);
activate(arg.windowName, false);
}
}
break;

View File

@ -187,9 +187,7 @@ export const activate = (
// Bring the window to the top without focusing
// Flash task bar icon in Windows for windows
if (!shouldFocus) {
return isMac || isLinux
? window.showInactive()
: window.flashFrame(true);
return isMac || isLinux ? window.show() : window.flashFrame(true);
}
// Note: On window just focusing will preserve window snapped state