summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXWm.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXWm.c')
-rw-r--r--macosx/tkMacOSXWm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c
index cdfc1a1..8d8a8c1 100644
--- a/macosx/tkMacOSXWm.c
+++ b/macosx/tkMacOSXWm.c
@@ -1058,7 +1058,9 @@ TkWmDeadWindow(
*/
deadNSWindow = (TKWindow *)wmPtr->window;
- [deadNSWindow setIsDead:YES];
+ if ([deadNSWindow respondsToSelector:@selector(setIsDead)]) {
+ [deadNSWindow setIsDead:YES];
+ }
if (deadNSWindow && !Tk_IsEmbedded(winPtr)) {
NSWindow *parent = [deadNSWindow parentWindow];
[deadNSWindow setTkWindow:None];
@@ -1107,6 +1109,7 @@ TkWmDeadWindow(
wmPtr2->hints.initial_state != WithdrawnState);
if (w != deadNSWindow && isOnScreen && [w canBecomeKeyWindow]) {
[w makeKeyAndOrderFront:NSApp];
+ [NSApp setTkEventTarget:TkMacOSXGetTkWindow(w)];
break;
}
}
@@ -6646,6 +6649,7 @@ TkpChangeFocus(
}
if (win && [win canBecomeKeyWindow]) {
[win makeKeyAndOrderFront:NSApp];
+ [NSApp setTkEventTarget:TkMacOSXGetTkWindow(win)];
}
}