[gtk+] Protect sectond call of nsevent hasPreciseScrollingDeltas from pre-Lion
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Protect sectond call of nsevent hasPreciseScrollingDeltas from pre-Lion
- Date: Mon, 3 Sep 2012 23:56:53 +0000 (UTC)
commit f2ab3af20afe2f1524099091288c099bf1dd3c2b
Author: John Ralls <jralls ceridwen us>
Date: Mon Sep 3 16:56:46 2012 -0700
Protect sectond call of nsevent hasPreciseScrollingDeltas from pre-Lion
gdk/quartz/gdkevents-quartz.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c
index 0c4c240..b2ecb1a 100644
--- a/gdk/quartz/gdkevents-quartz.c
+++ b/gdk/quartz/gdkevents-quartz.c
@@ -1386,7 +1386,8 @@ gdk_event_translate (GdkEvent *event,
if (dx != 0.0 || dy != 0.0)
{
- if ([nsevent hasPreciseScrollingDeltas])
+#ifdef AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
+ if (gdk_quartz_osx_version() >= GDK_OSX_LION &[nsevent hasPreciseScrollingDeltas])
{
GdkEvent *emulated_event;
@@ -1398,6 +1399,7 @@ gdk_event_translate (GdkEvent *event,
append_event (emulated_event, TRUE);
}
else
+#endif
fill_scroll_event (window, event, nsevent,
x, y, x_root, y_root,
dx, dy, direction);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]