diff options
author | Kevin Walzer <kw@codebykevin.com> | 2021-05-08 12:42:47 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2021-05-08 12:42:47 (GMT) |
commit | b597711f3ceb2a7e2f2f0feebd21e85e961dd47d (patch) | |
tree | 1f9269484ca900820dee7cfa9784cc6b58348a90 /macosx | |
parent | 95c60df9d7fad7c5fa9cd8748740ebceb3148165 (diff) | |
parent | 2fe97a8288c74f1398d5217c06a9b39c3982ae9d (diff) | |
download | tk-b597711f3ceb2a7e2f2f0feebd21e85e961dd47d.zip tk-b597711f3ceb2a7e2f2f0feebd21e85e961dd47d.tar.gz tk-b597711f3ceb2a7e2f2f0feebd21e85e961dd47d.tar.bz2 |
Merging fix for 7bb246b072, thanks to M. Wayne Davis for the report
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXInit.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/macosx/tkMacOSXInit.c b/macosx/tkMacOSXInit.c index 9100d45..fe0b35b 100644 --- a/macosx/tkMacOSXInit.c +++ b/macosx/tkMacOSXInit.c @@ -103,18 +103,38 @@ static int TkMacOSXGetAppPathCmd(ClientData cd, Tcl_Interp *ip, #endif [self _setupWindowNotifications]; [self _setupApplicationNotifications]; + + if ([NSApp macOSVersion] >= 110000) { + + /* + * Initialize Apple Event processing. Apple's docs (see + * https://developer.apple.com/documentation/appkit/nsapplication) + * recommend doing this here, although historically we have + * done this in applicationWillFinishLaunching. In response to + * bug 7bb246b072. + */ + + TkMacOSXInitAppleEvents(_eventInterp); + + } } -(void)applicationDidFinishLaunching:(NSNotification *)notification { (void)notification; + if ([NSApp macOSVersion] < 110000) { + /* - * Initialize event processing. + * Initialize Apple Event processing on macOS versions + * older than Big Sur (11). */ TkMacOSXInitAppleEvents(_eventInterp); + } + + /* * Initialize the graphics context. */ |