lv2 / pugl

A minimal portable API for embeddable GUIs
https://gitlab.com/lv2/pugl/
ISC License
174 stars 34 forks source link

Inconsistent mouse scroll delta on different OSes #125

Closed falkTX closed 2 months ago

falkTX commented 2 months ago

On latest pugl the mouse scroll is around 10x slower on macOS versus other platforms.

Dont really know the details anymore, I should have reported this earlier but was always waiting for a possibility to test on win + mac + linux that didnt happen and then forgot about it.

So I don't really have details right now, but I think it should very obvious once you try it and either log the values or have a test tool for it. Basically the Linux and Windows scroll delta behave similarly (tested with a usb mouse and touchpad) while on macOS the delta values are much lower, but I dont recall if I tested on mousepad or usb mouse.

Reporting now since you are doing some pugl changes, so taking the opportinity for it.

drobilla commented 2 months ago

The wheel was very slow on MacOS.

As far as I can tell there's no well-defined way to convert to "lines" on MacOS, I'm guessing they've largely dispensed with the idea scroll wheel detents. We might need a more expressive API to be able to handle fancy scrolling and old school wheels. In the mean time, I don't have any of their fancy input devices to test on (other than a Macbook touchpad), and this makes them work the same at least for a single tick of the wheel on an external mouse: f7b3fe4

Touchpad speed is unaffected but feels vaguely reasonable to me (I can achieve a 1.0 line scroll going very slowly and deliberately, which is about right).