From d77fce1b77847fe7153ef3a7afc3156747fa9b5f Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Sat, 21 Sep 2013 14:24:59 +0200 Subject: [PATCH] Avoid warning message --- src/SFML/Window/OSX/SFApplication.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SFML/Window/OSX/SFApplication.m b/src/SFML/Window/OSX/SFApplication.m index 6af69dde..067968f3 100644 --- a/src/SFML/Window/OSX/SFApplication.m +++ b/src/SFML/Window/OSX/SFApplication.m @@ -252,9 +252,10 @@ // custom OpenGL view. See -[SFOpenGLView sfKeyUp:] for more details. id firstResponder = [[anEvent window] firstResponder]; - if ([anEvent type] == NSKeyUp && [firstResponder respondsToSelector:@selector(sfKeyUp:)]) { - [firstResponder sfKeyUp:anEvent]; - } else { + if ([anEvent type] != NSKeyUp + || ![firstResponder tryToPerform:@selector(sfKeyUp:) with:anEvent]) { + // It's either not a key up event or no responder has a sfKeyUp + // message implemented. [super sendEvent:anEvent]; } }