diff options
Diffstat (limited to 'src/synaptics-x11.c')
-rw-r--r-- | src/synaptics-x11.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/synaptics-x11.c b/src/synaptics-x11.c index 3a6d930..d7168af 100644 --- a/src/synaptics-x11.c +++ b/src/synaptics-x11.c @@ -818,19 +818,20 @@ void SynapticsMotionEvent(SynapticsPrivate *priv, int x, int y) xf86PostMotionEvent(pInfo->dev, FALSE, 0, 2, x, y); } -void SynapticsScrollEvent(SynapticsPrivate *priv, VMask *scroll_mask) +void SynapticsScrollEvent(SynapticsPrivate *priv, unsigned int which, double vert, double horiz) { struct SynapticsX11 *x11 = priv->frontend_data; InputInfoPtr pInfo = x11->pInfo; ValuatorMask *m = x11->event_mask; - int i; + + if (!which) + return; valuator_mask_zero(x11->event_mask); - for (i = 0; i < vmask_size(scroll_mask); i++) { - double val; - if (vmask_fetch_double(scroll_mask, i, &val)) - valuator_mask_set_double(m, i, val); - } + if (which & SCROLL_VERT) + valuator_mask_set_double(m, priv->scroll_axis_vert, vert); + if (which & SCROLL_HORIZ) + valuator_mask_set_double(m, priv->scroll_axis_horiz, horiz); xf86PostMotionEventM(pInfo->dev, FALSE, m); } |