diff options
Diffstat (limited to 'macosx/tkMacOSXWindowEvent.c')
-rw-r--r-- | macosx/tkMacOSXWindowEvent.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/macosx/tkMacOSXWindowEvent.c b/macosx/tkMacOSXWindowEvent.c index 2666939..fe6981d 100644 --- a/macosx/tkMacOSXWindowEvent.c +++ b/macosx/tkMacOSXWindowEvent.c @@ -1186,6 +1186,11 @@ RedisplayView( return YES; } +/* + * This keyDown method does nothing, which is a huge improvement over the + * default keyDown method which beeps every time a key is pressed. + */ + - (void) keyDown: (NSEvent *) theEvent { #ifdef TK_MAC_DEBUG_EVENTS @@ -1193,6 +1198,23 @@ RedisplayView( #endif } +/* + * When the services menu is opened this is called for each Responder in + * the Responder chain until a service provider is found. The TkContentView + * should be the first (and generally only) Responder in the chain. We + * return the TkServices object that was created in TkpInit. + */ + +- (id)validRequestorForSendType:(NSString *)sendType + returnType:(NSString *)returnType +{ + if ([sendType isEqualToString:@"NSStringPboardType"] || + [sendType isEqualToString:@"NSPasteboardTypeString"]) { + return [NSApp servicesProvider]; + } + return [super validRequestorForSendType:sendType returnType:returnType]; +} + @end /* |