summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXSubwindows.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2015-03-15 20:32:14 (GMT)
committerKevin Walzer <kw@codebykevin.com>2015-03-15 20:32:14 (GMT)
commit9df910230823bd6be37562f8f344258c54add11f (patch)
tree386fb5ea45b4fe497e77a1c7188b45a6316a8435 /macosx/tkMacOSXSubwindows.c
parent8aa3278f2572dd3af0d953e4358071396597e26f (diff)
downloadtk-9df910230823bd6be37562f8f344258c54add11f.zip
tk-9df910230823bd6be37562f8f344258c54add11f.tar.gz
tk-9df910230823bd6be37562f8f344258c54add11f.tar.bz2
Wish now launches in front when caed 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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/macosx/tkMacOSXSubwindows.c b/macosx/tkMacOSXSubwindows.c
index d557db3..95cc338 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);
}