[PATCH evdev, v2] Support smooth scrolling on wheel emulation
peter.hutterer at who-t.net
Wed Oct 12 22:55:45 PDT 2011
On Thu, Oct 06, 2011 at 11:45:58PM +0200, Max Schwarz wrote:
> Hi Peter,
> > you could make the support compiled in, but not compiled _out_. so even if
> > you HAVE_SMOOTH_SCROLLING, the old bits are ready to go when enabled.
> > if no smooth scrolling axis is otherwise present on the device, just post
> > button events as previously.
> Well, the proper thing to do would be to add new valuators and report the
> changed axes via a XIDeviceChangedEvent. But since there's no infrastructure
> for that yet (or is it?), I'll do it that way.
correct, we don't have that infrastructure yet. one day...
> > > #define TestBit(bit, array) ((array[(bit) / LONG_BITS]) & (1L <<
> > > ((bit) %>
> > > LONG_BITS)))
> > > +#define evdev_SetBit(bit, array) ((array[(bit) / LONG_BITS]) |= (1L <<
> > > ((bit)
> > Can we use the server's BitIsOn (inputstr.h), SetBit, etc here instead of
> > relying on our own macros with name conflicts?
> That wouldn't be the same on Big-Endian machines, since BitIsOn() from
> inputstr.h expects an char array, while the evdev bitmasks are kept in longs.
> I agree that this bit looks bad, maybe we could rename TestBit to
> evdev_TestBit to match evdev_SetBit?
evdev_set_bit, evdev_bit_isset then please. preferably inline functions to
get some type safety and extra compiler warnings.
More information about the xorg-devel