From f2ab3af20afe2f1524099091288c099bf1dd3c2b Mon Sep 17 00:00:00 2001 From: John Ralls Date: Mon, 3 Sep 2012 16:56:46 -0700 Subject: [PATCH] Protect sectond call of nsevent hasPreciseScrollingDeltas from pre-Lion --- gdk/quartz/gdkevents-quartz.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdk/quartz/gdkevents-quartz.c b/gdk/quartz/gdkevents-quartz.c index 0c4c240793..b2ecb1a31f 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);