]> git.proxmox.com Git - mirror_novnc.git/commit
Combine small mouse wheel events
authorSamuel Mannehed <samuel@cendio.se>
Tue, 12 Sep 2017 09:16:24 +0000 (11:16 +0200)
committerSamuel Mannehed <samuel@cendio.se>
Sun, 17 Sep 2017 16:23:57 +0000 (18:23 +0200)
commit28b004fd70818e4410cbb3ad62ef27206948172d
treeb6418a27fe3c0d05a06ac3b6f401bfe80be036db
parentc1e2785fb69701240f71969ee761780ede9e4a9f
Combine small mouse wheel events

The VNC protocol can't handle different deltas or speeds for a mouse
wheel event. When using a device that sends a lot of small mouse wheel
events, instead of fewer larger steps, the effect was that mouse wheel
scrolling was way to sensitive.
This patch looks at the delta of wheel events and doesn't send events
until the combined delta has passed a threshold. Single events that
doesn't pass the threshold get sent after a timeout in order to not
loose any events.

Fixes #577.
core/input/mouse.js
tests/test.mouse.js