fix: restore original BrowserWindow.show() behavior (#42305)
The new activate API on macOS is pretty bad, we should just keep using the old API. Similar to #42180. Restores non-panel behavior to pre-panel support. Notes: BrowserWindow.show() now correctly restores focus to inactive apps on macOS Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
This commit is contained in:
parent
e21c70a9e0
commit
8edbefcfa3
1 changed files with 1 additions and 5 deletions
|
@ -457,11 +457,7 @@ void NativeWindowMac::Show() {
|
|||
|
||||
// Panels receive key focus when shown but should not activate the app.
|
||||
if (!IsPanel()) {
|
||||
if (@available(macOS 14.0, *)) {
|
||||
[[NSApplication sharedApplication] activate];
|
||||
} else {
|
||||
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
|
||||
}
|
||||
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
|
||||
}
|
||||
[window_ makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue