summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXNotify.c
diff options
context:
space:
mode:
authorculler <culler>2018-11-30 22:11:48 (GMT)
committerculler <culler>2018-11-30 22:11:48 (GMT)
commitdbf1875126153a5dff05b89cbd7ab1d9ce6ef5d0 (patch)
treeda98509c5fc6e022f17a7d355153b31cbbac4ae3 /macosx/tkMacOSXNotify.c
parent2f18a3f080b8f55b2b4be4a90e948531f203eb7d (diff)
downloadtk-dbf1875126153a5dff05b89cbd7ab1d9ce6ef5d0.zip
tk-dbf1875126153a5dff05b89cbd7ab1d9ce6ef5d0.tar.gz
tk-dbf1875126153a5dff05b89cbd7ab1d9ce6ef5d0.tar.bz2
Make tabbed windows work correctly on macOS.
Diffstat (limited to 'macosx/tkMacOSXNotify.c')
-rw-r--r--macosx/tkMacOSXNotify.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/macosx/tkMacOSXNotify.c b/macosx/tkMacOSXNotify.c
index 8c01fe3..88e7c76 100644
--- a/macosx/tkMacOSXNotify.c
+++ b/macosx/tkMacOSXNotify.c
@@ -135,7 +135,9 @@ void DebugPrintQueue(void)
*/
/*
- * Call super then check the pasteboard.
+ * Since the contentView is the first responder for a Tk Window, it is
+ * responsible for sending events up the responder chain. We also check
+ * the pasteboard here.
*/
- (void) sendEvent: (NSEvent *) theEvent
{
@@ -360,7 +362,7 @@ TkMacOSXEventsCheckProc(
int oldServiceMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);
NSEvent *processedEvent = [NSApp tkProcessEvent:currentEvent];
Tcl_SetServiceMode(oldServiceMode);
- if (processedEvent) { /* Should always be non-NULL. */
+ if (processedEvent) {
#ifdef TK_MAC_DEBUG_EVENTS
TKLog(@" event: %@", currentEvent);
#endif
@@ -370,6 +372,7 @@ TkMacOSXEventsCheckProc(
[NSApp sendEvent:currentEvent];
}
}
+
} else {
break;
}