Protect sectond call of nsevent hasPreciseScrollingDeltas from pre-Lion

This commit is contained in:
John Ralls 2012-09-03 16:56:46 -07:00
parent fa029fd787
commit f2ab3af20a

View File

@ -1386,7 +1386,8 @@ gdk_event_translate (GdkEvent *event,
if (dx != 0.0 || dy != 0.0) 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; GdkEvent *emulated_event;
@ -1398,6 +1399,7 @@ gdk_event_translate (GdkEvent *event,
append_event (emulated_event, TRUE); append_event (emulated_event, TRUE);
} }
else else
#endif
fill_scroll_event (window, event, nsevent, fill_scroll_event (window, event, nsevent,
x, y, x_root, y_root, x, y, x_root, y_root,
dx, dy, direction); dx, dy, direction);