From d859c921c563c9f602ae4462bf860c5fe91625a5 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Thu, 1 Mar 2012 17:00:35 -0800 Subject: [PATCH] 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. --- gdk/quartz/gdkevents-quartz.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c index 58bc58ba11..7ae6a69402 100644 --- a/gdk/quartz/gdkevents-quartz.c +++ b/gdk/quartz/gdkevents-quartz.c @@ -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];