scrolling: interpret smooth deltas as pixels on quartz

This is a temporary workaround for scrolling units being amplified
on quartz, due to the assumption that smooth scrolling deltas are
always in some abstract unit similar to the one from xi2.

A proper solution for the situation is described in bug #736121, but
since we are close to release, this patch solves the issue temporarily.

https://bugzilla.gnome.org/show_bug.cgi?id=736121
This commit is contained in:
Jesse van den Kieboom
2014-09-05 13:38:30 +02:00
parent fb3019a946
commit 3fa425bb9c
2 changed files with 14 additions and 0 deletions

View File

@ -2806,6 +2806,10 @@ _gtk_range_get_wheel_delta (GtkRange *range,
if (gdk_event_get_scroll_deltas ((GdkEvent *) event, &dx, &dy))
{
#ifdef GDK_WINDOWING_QUARTZ
scroll_unit = 1;
#endif
if (dx != 0 &&
gtk_orientable_get_orientation (GTK_ORIENTABLE (range)) == GTK_ORIENTATION_HORIZONTAL)
delta = dx * scroll_unit;