Don't call -[NSView setAcceptsTouchEvents] if the OS doesn't provide it.

Thanks to Dimiter 'malkia' Stanev for the fix!
This commit is contained in:
Ryan C. Gordon 2011-12-09 02:32:21 -05:00
parent f1b292b5fd
commit 7023079a50

View file

@ -69,8 +69,11 @@ static __inline__ void ConvertNSRect(NSRect *r)
[window setAcceptsMouseMovedEvents:YES];
[view setNextResponder:self];
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060
[view setAcceptsTouchEvents:YES];
if ([view respondsToSelector:@selector(setAcceptsTouchEvents:)]) {
[view setAcceptsTouchEvents:YES];
}
#endif
}