Fixed escape cancelling fullscreen mode now that the SDL window is the first res
authorSam Lantinga <slouken@libsdl.org>
Wed, 04 Jun 2014 01:56:14 -0700
changeset 8809054ec268f363
parent 8808 da1e1d6e84c4
child 8810 901ac824a18b
Fixed escape cancelling fullscreen mode now that the SDL window is the first res
ponder.
src/video/cocoa/SDL_cocoawindow.m
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Wed Jun 04 01:35:36 2014 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Wed Jun 04 01:56:14 2014 -0700
     1.3 @@ -57,6 +57,7 @@
     1.4  - (BOOL)canBecomeKeyWindow;
     1.5  - (BOOL)canBecomeMainWindow;
     1.6  - (void)sendEvent:(NSEvent *)event;
     1.7 +- (void)doCommandBySelector:(SEL)aSelector;
     1.8  @end
     1.9  
    1.10  @implementation SDLWindow
    1.11 @@ -87,6 +88,14 @@
    1.12        [delegate windowDidFinishMoving];
    1.13    }
    1.14  }
    1.15 +
    1.16 +/* We'll respond to selectors by doing nothing so we don't beep.
    1.17 + * The escape key gets converted to a "cancel" selector, etc.
    1.18 + */
    1.19 +- (void)doCommandBySelector:(SEL)aSelector
    1.20 +{
    1.21 +    /*NSLog(@"doCommandBySelector: %@\n", NSStringFromSelector(aSelector));*/
    1.22 +}
    1.23  @end
    1.24  
    1.25  
    1.26 @@ -654,14 +663,6 @@
    1.27      /*Cocoa_HandleKeyEvent(SDL_GetVideoDevice(), theEvent);*/
    1.28  }
    1.29  
    1.30 -/* We'll respond to selectors by doing nothing so we don't beep.
    1.31 - * The escape key gets converted to a "cancel" selector, etc.
    1.32 - */
    1.33 -- (void)doCommandBySelector:(SEL)aSelector
    1.34 -{
    1.35 -    /*NSLog(@"doCommandBySelector: %@\n", NSStringFromSelector(aSelector));*/
    1.36 -}
    1.37 -
    1.38  - (void)mouseDown:(NSEvent *)theEvent
    1.39  {
    1.40      int button;