[OpenSmalltalk/opensmalltalk-vm] b98235: Deliver mouse wheel events only once they reach a ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] b98235: Deliver mouse wheel events only once they reach a ...

Eliot Miranda-3
 
  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...


Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] b98235: Deliver mouse wheel events only once they reach a ...

timrowledge
 


> On 2019-12-26, at 12:42 PM, Nicolas Cellier <[hidden email]> wrote:
>
>  Deliver mouse wheel events only once they reach a threshold

Thank you for this - and the horizontal scrolly-thing too. It's been driving me nuts for ages but I never got enough annoyance together to do anything about it!

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- Got his brains as a stocking stuffer.