Branch: refs/heads/win_generate_mouse_wheel_events
Home:
https://github.com/OpenSmalltalk/opensmalltalk-vm Commit: b982355886cfb5505151edb1e35c7df6432a9c30
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/b982355886cfb5505151edb1e35c7df6432a9c30 Author: Nicolas Cellier <
[hidden email]>
Date: 2019-12-26 (Thu, 26 Dec 2019)
Changed paths:
M platforms/win32/vm/sqWin32Window.c
Log Message:
-----------
Deliver mouse wheel events only once they reach a threshold
On some devices (example Mac trackpad), many events are generated with small deltas.
This is overwhelming the EventSensor loop at image side to the detriment of user experience.
Workaround by letting the VM accumulate those deltas until they reach a threshold before delivering.
In case of high delta values, we generate a single value.
It's up to image side to handle those values
(until now, Squeak 5.3 just ignored them, VM is not to be blamed for that).
Note: 2 values are hardcoded for now
- the timeout for stopping accumulation (500ms)
- the threshold for delivering the event to the image.
The threshold could have been WHEEL_DELTA, but it gives bad sensitivity on my own device, so use only a fraction of that in the hope that it fits other devices too.
Please report if those tuning are inappropriate. We may add parameters in the future if necessary...