fix: do not activate app when showing a panel on Mac (#41844)

* fix: do not activate app when showing or focusing a panel on Mac

Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>

* restored panel activation test

Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Mitchell Cohen <mitch.cohen@me.com>
This commit is contained in:
trop[bot] 2024-04-13 16:55:42 +02:00 committed by GitHub
parent d6d6dd973f
commit 1b6e7768fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 32 deletions

View file

@ -1246,7 +1246,6 @@ describe('BrowserWindow module', () => {
}
});
// FIXME: disabled in `disabled-tests.json`
ifit(process.platform === 'darwin')('it does not activate the app if focusing an inactive panel', async () => {
// Show to focus app, then remove existing window
w.show();
@ -1269,7 +1268,7 @@ describe('BrowserWindow module', () => {
const isShow = once(w, 'show');
const isFocus = once(w, 'focus');
w.showInactive();
w.show();
w.focus();
await isShow;