summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXInit.c')
-rw-r--r--macosx/tkMacOSXInit.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c
index 3d15442..aae315a 100644
--- a/macosx/tkMacOSXInit.c
+++ b/macosx/tkMacOSXInit.c
@@ -127,14 +127,12 @@ static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip,
* It is not safe to force activation of the NSApp until this method is
* called. Activating too early can cause the menu bar to be unresponsive.
* The call to activateIgnoringOtherApps was moved here to avoid this.
- * However, with the release of macOS 10.15 (Catalina) this was no longer
- * sufficient. (See ticket bf93d098d7.) Apparently apps were being
- * activated automatically, and this was sometimes being done too early.
- * As a workaround we deactivate and then reactivate the app, even though
- * Apple says that "Normally, you shouldn’t invoke this method".
+ * However, with the release of macOS 10.15 (Catalina) that was no longer
+ * sufficient. (See ticket bf93d098d7.) The call to setActivationPolicy
+ * needed to be moved into this function as well.
*/
- [NSApp deactivate];
+ [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
[NSApp activateIgnoringOtherApps: YES];
/*
@@ -186,12 +184,6 @@ static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip,
[self setDelegate:self];
/*
- * Make sure we are allowed to open windows.
- */
-
- [NSApp setActivationPolicy:NSApplicationActivationPolicyRegular];
-
- /*
* If no icon has been set from an Info.plist file, use the Wish icon from
* the Tk framework.
*/