summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authormarc_culler <marc.culler@gmail.com>2020-01-18 19:07:47 (GMT)
committermarc_culler <marc.culler@gmail.com>2020-01-18 19:07:47 (GMT)
commit99be8f67054bc21a0a099763b7fd0db8d2a6b9f5 (patch)
tree39712d43a0c03cf8444010a49c125114a36d3ca0 /macosx
parent34f407f5988a2f1f93818dea9b4d7573355581af (diff)
parentb9e2dea402e118862d49b7d41a88803ae7207606 (diff)
downloadtk-99be8f67054bc21a0a099763b7fd0db8d2a6b9f5.zip
tk-99be8f67054bc21a0a099763b7fd0db8d2a6b9f5.tar.gz
tk-99be8f67054bc21a0a099763b7fd0db8d2a6b9f5.tar.bz2
A better fix for [bf93d098d7]: Aqua menus can be unresponsive at startup
Diffstat (limited to 'macosx')
-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.
*/