Quartz: Fix incompatible types in assignment

NSEvent -scrollingDeltaX and -scrollingDeltaY aren't defined before
10.7, so objc assumes that they return a pointer. Trying to cast to a
float generates a compiler error.
This commit is contained in:
John Ralls 2012-03-01 17:00:35 -08:00
parent b2a8e6ed04
commit d859c921c5

View File

@ -1325,7 +1325,7 @@ gdk_event_translate (GdkEvent *event,
GdkScrollDirection direction;
float dx;
float dy;
#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
if (gdk_quartz_osx_version() >= GDK_OSX_LION &&
[nsevent hasPreciseScrollingDeltas])
{
@ -1338,7 +1338,7 @@ gdk_event_translate (GdkEvent *event,
/* Fall through for scroll buttons emulation */
}
#endif
dx = [nsevent deltaX];
dy = [nsevent deltaY];