On Mon, Jan 19, 2015 at 05:49:36PM -0800, Bill Spitzak wrote: > I really find it doubtful that users are thinking about how many times the > scroll wheel has revolved about it's axis! Much more likely is the tangent > distance that the edge of the scroll wheel has moved. > > On a really typical mouse that I have it seems to be about 2.5mm per click. > Looking at it from the side I think maybe I get 4 clicks for a 45 degree > rotation, which means one click is 11.25 degrees.
you can measure that quite accurately: mark the wheel with a pen, spin it until the spot marked is in the same position and then count the number of REL_WHEEL events received. > I also have a Kensington track ball with a big ring around it that you > rotate for the scroll wheel, I suppose then somebody would think about > angle. I counted and it is doing 42 steps for a full rotation, or 8.6 > degrees per click. that would need a udev hwdb entry then. > Windows api, which probably should be paid attention to just because of the > existence of software, indicates that it mulitplies the clicks by 120 (from > WM_MOUSEWHEEL docs): Qt does the same, one unit is defined at 1/8 of a degree. which makes sense if you have an API with ints but we already use doubles so it's pretty much the same. Cheers, Peter > "The wheel rotation will be a multiple of WHEEL_DELTA, which is set at 120. > This is the threshold for action to be taken, and one such action (for > example, scrolling one increment) should occur for each delta. > The delta was set to 120 to allow Microsoft or other vendors to build > finer-resolution wheels (a freely-rotating wheel with no notches) to send > more messages per rotation, but with a smaller value in each message. To use > this feature, you can either add the incoming delta values until WHEEL_DELTA > is reached (so for a delta-rotation you get the same response), or scroll > partial lines in response to the more frequent messages. You can also choose > your scroll granularity and accumulate deltas until it is reached." > > I remember doing some stuff with this and pretty much had to assume each > event was a wheel click, as the suggested summation did not really work and > would quickly get out of sync with the clicks. Assuming other software did > this as well, it would explain why such "finer-resolution wheels" > disappeared from the market: event the tiniest motion would be treated as a > full wheel click by this software and would make your window scroll far too > fast. > > All in all this change seems pretty questionable. > > On 01/11/2015 03:12 PM, Peter Hutterer wrote: > >Similar to the mouse resolution, let's make the scroll distance a sensible > >predictable value. Most mice use a 15 degree angle per scroll click, so let's > >change to that. This will alter behaviour in clients that expect 10 but it > >shouldn't be too bad. We return doubles anyway for the axis value, so that > >leaves the option of really fine-grained step sizes. > > > >We currently assume all mice have 15 degree angles. Like the DPI settings, it > >will require a udev property to be set. Patch for that to follow. _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
