Skip to content

Commit

Permalink
Revert "SDA-4604 Limiting window activation change to macOS for bring…
Browse files Browse the repository at this point in the history
…-to-front feature only (finos#2176) (finos#2177)"

This reverts commit e543476.
  • Loading branch information
sbenmoussati committed Jul 19, 2024
1 parent e543476 commit c75a130
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/mainApiHandler.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ describe('main api handler', () => {
reason: 'notification',
windowName: 'notification',
};
const expectedValue = ['notification', false];
const expectedValue = ['notification'];
ipcMain.send(apiName.symphonyApi, value);
expect(spy).toBeCalledWith(...expectedValue);
});
Expand Down
2 changes: 1 addition & 1 deletion src/app/main-api-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, false);
activate(arg.windowName);
}
}
break;
Expand Down
4 changes: 3 additions & 1 deletion src/app/window-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ 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.show() : window.flashFrame(true);
return isMac || isLinux
? window.showInactive()
: window.flashFrame(true);
}

// Note: On window just focusing will preserve window snapped state
Expand Down

0 comments on commit c75a130

Please sign in to comment.