Skip to content

Commit

Permalink
shiny/driver/gldriver: stop activating regardless of the current app
Browse files Browse the repository at this point in the history
Documentation for NSApplicationActivateIgnoringOtherApps warns:

> Important: You should rarely pass this flag because stealing
> key focus produces a poor user experience.

The flag is also deprecated and no longer has effect in macOS 14.
Stop setting it.

Change-Id: I8b8794332b54445866e038d9537a4b0eb4e75149
Cq-Include-Trybots: luci.golang.try:x_exp-gotip-darwin-amd64_14
Reviewed-on: https://go-review.googlesource.com/c/exp/+/532581
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
  • Loading branch information
dmitshur authored and gopherbot committed Oct 5, 2023
1 parent 9212866 commit 3e424a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shiny/driver/gldriver/cocoa.m
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ @interface AppDelegate : NSObject<NSApplicationDelegate>
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
driverStarted();
[[NSRunningApplication currentApplication] activateWithOptions:(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
[[NSRunningApplication currentApplication] activateWithOptions:NSApplicationActivateAllWindows];
}

- (void)applicationWillTerminate:(NSNotification *)aNotification {
Expand Down

0 comments on commit 3e424a5

Please sign in to comment.