mirror of
https://github.com/X11Libre/xf86-input-synaptics.git
synced 2026-03-24 01:34:04 +00:00
Fix scoll increment for non-smooth scrolling (#46617)
Introduced in2603ad69b9. Previously, the delta was incremented by (actual delta/scroll dist), button clicks where then sent while (delta-- >= 1). After2603ad69b9, the delta was incremented by the delta only, scroll dist was used as increment in the smooth scrolling information. On non-smooth-scrolling servers, the driver would now send too many events. Restore the old behaviour by dividing by the scroll distance before entering the button click loop. X.Org Bug 46617 <http://bugs.freedesktop.org/show_bug.cgi?id=46617> Tested-by: Peter Zotov <whitequark@whitequark.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -2512,6 +2512,12 @@ post_scroll_events(const InputInfoPtr pInfo)
|
||||
if (valuator_mask_num_valuators(priv->scroll_events_mask))
|
||||
xf86PostMotionEventM(pInfo->dev, FALSE, priv->scroll_events_mask);
|
||||
#else
|
||||
SynapticsParameters *para = &priv->synpara;
|
||||
|
||||
/* smooth scrolling uses the dist as increment */
|
||||
priv->scroll.delta_y /= para->scroll_dist_vert;
|
||||
priv->scroll.delta_x /= para->scroll_dist_horiz;
|
||||
|
||||
while (priv->scroll.delta_y <= -1.0)
|
||||
{
|
||||
post_button_click(pInfo, 4);
|
||||
|
||||
Reference in New Issue
Block a user