diff options
author | Kevin Walzer <kw@codebykevin.com> | 2015-03-15 20:22:13 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2015-03-15 20:22:13 (GMT) |
commit | 6d849d232afb87840ffe3c1f9055e400e0907a63 (patch) | |
tree | c3286f47ef4ef5e87529cdb80059521711740ad0 /macosx/tkMacOSXSubwindows.c | |
parent | c68ea4689ef059f8cb246200b048e574766e8b84 (diff) | |
download | tk-6d849d232afb87840ffe3c1f9055e400e0907a63.zip tk-6d849d232afb87840ffe3c1f9055e400e0907a63.tar.gz tk-6d849d232afb87840ffe3c1f9055e400e0907a63.tar.bz2 |
Wish now launches in front when called from command line, and focus -force works correctly; thanks to Marc Culler for patch
Diffstat (limited to 'macosx/tkMacOSXSubwindows.c')
-rw-r--r-- | macosx/tkMacOSXSubwindows.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c index 1a71746..ee9167b 100644 --- a/macosx/tkMacOSXSubwindows.c +++ b/macosx/tkMacOSXSubwindows.c @@ -149,8 +149,10 @@ XMapWindow( if (Tk_IsTopLevel(macWin->winPtr)) { if (!Tk_IsEmbedded(macWin->winPtr)) { NSWindow *win = TkMacOSXDrawableWindow(window); - - [win makeKeyAndOrderFront:NSApp]; + [NSApp activateIgnoringOtherApps:YES]; + if ( [win canBecomeKeyWindow] ) { + [win makeKeyAndOrderFront:NSApp]; + } [win windowRef]; TkMacOSXApplyWindowAttributes(macWin->winPtr, win); } |