From 16360b19793c961030216178c545a54c74e0400e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 4 Jun 2014 01:56:14 -0700 Subject: [PATCH] Fixed escape cancelling fullscreen mode now that the SDL window is the first res ponder. --- src/video/cocoa/SDL_cocoawindow.m | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m index 13bfb7bc6abb8..0132124c3aa66 100644 --- a/src/video/cocoa/SDL_cocoawindow.m +++ b/src/video/cocoa/SDL_cocoawindow.m @@ -57,6 +57,7 @@ @interface SDLWindow : NSWindow - (BOOL)canBecomeKeyWindow; - (BOOL)canBecomeMainWindow; - (void)sendEvent:(NSEvent *)event; +- (void)doCommandBySelector:(SEL)aSelector; @end @implementation SDLWindow @@ -87,6 +88,14 @@ - (void)sendEvent:(NSEvent *)event [delegate windowDidFinishMoving]; } } + +/* We'll respond to selectors by doing nothing so we don't beep. + * The escape key gets converted to a "cancel" selector, etc. + */ +- (void)doCommandBySelector:(SEL)aSelector +{ + /*NSLog(@"doCommandBySelector: %@\n", NSStringFromSelector(aSelector));*/ +} @end @@ -654,14 +663,6 @@ - (void)keyUp:(NSEvent *)theEvent /*Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);*/ } -/* We'll respond to selectors by doing nothing so we don't beep. - * The escape key gets converted to a "cancel" selector, etc. - */ -- (void)doCommandBySelector:(SEL)aSelector -{ - /*NSLog(@"doCommandBySelector: %@\n", NSStringFromSelector(aSelector));*/ -} - - (void)mouseDown:(NSEvent *)theEvent { int button;