diff --git a/ui/drivers/cocoa/apple_platform.h b/ui/drivers/cocoa/apple_platform.h index 221ce68d88..11860ba450 100644 --- a/ui/drivers/cocoa/apple_platform.h +++ b/ui/drivers/cocoa/apple_platform.h @@ -8,20 +8,9 @@ #if defined(HAVE_COCOA_METAL) && !defined(HAVE_COCOATOUCH) @interface WindowListener : NSResponder -@end - -@implementation WindowListener - -/* Similarly to SDL, we'll respond to key events by doing nothing so we don't beep. - */ -- (void)flagsChanged:(NSEvent *)event { } -- (void)keyDown:(NSEvent *)event { } -- (void)keyUp:(NSEvent *)event { } - @end #endif - #if defined(HAVE_COCOA_METAL) || defined(HAVE_COCOATOUCH) @protocol ApplePlatform diff --git a/ui/drivers/cocoa/cocoa_common.m b/ui/drivers/cocoa/cocoa_common.m index 08d074790f..0654ae3740 100644 --- a/ui/drivers/cocoa/cocoa_common.m +++ b/ui/drivers/cocoa/cocoa_common.m @@ -553,3 +553,16 @@ bool cocoa_get_metrics( return true; } #endif + +#if defined(HAVE_COCOA_METAL) && !defined(HAVE_COCOATOUCH) +@implementation WindowListener + +/* Similarly to SDL, we'll respond to key events + * by doing nothing so we don't beep. + */ +- (void)flagsChanged:(NSEvent *)event { } +- (void)keyDown:(NSEvent *)event { } +- (void)keyUp:(NSEvent *)event { } + +@end +#endif