Fixed escape cancelling fullscreen mode now that the SDL window is the first res ponder.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
diff --git a/src/video/cocoa/SDL_cocoawindow.m b/src/video/cocoa/SDL_cocoawindow.m
index 13bfb7b..0132124 100644
--- a/src/video/cocoa/SDL_cocoawindow.m
+++ b/src/video/cocoa/SDL_cocoawindow.m
@@ -57,6 +57,7 @@
- (BOOL)canBecomeKeyWindow;
- (BOOL)canBecomeMainWindow;
- (void)sendEvent:(NSEvent *)event;
+- (void)doCommandBySelector:(SEL)aSelector;
@end
@implementation SDLWindow
@@ -87,6 +88,14 @@
[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 @@ SetWindowStyle(SDL_Window * window, unsigned int style)
/*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;