Skip to content

Commit

Permalink
SDA-4604 Limiting window activation change to macOS for bring-to-fron…
Browse files Browse the repository at this point in the history
…t feature only (#2176) (#2177)
  • Loading branch information
sbenmoussati authored Jul 18, 2024
1 parent 6d68185 commit e543476
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 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'];
const expectedValue = ['notification', false];
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);
activate(arg.windowName, false);
}
}
break;
Expand Down
4 changes: 1 addition & 3 deletions src/app/window-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e543476

Please sign in to comment.