[gtk+] Quartz: Fix incompatible types in assignment
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Quartz: Fix incompatible types in assignment
- Date: Fri, 2 Mar 2012 01:03:32 +0000 (UTC)
commit d859c921c563c9f602ae4462bf860c5fe91625a5
Author: John Ralls <jralls ceridwen us>
Date: Thu Mar 1 17:00:35 2012 -0800
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 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 58bc58b..7ae6a69 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];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]