Peter Hutterer b8519930e4 Ensure enough buttons are advertised to pass the button mapping.
Some buttons are mapped to higher button numbers. For example, BTN_0 is
posted as button 8 if BTN_LEFT is present. On top of that, the
driver-specific button mapping may map the button to something else again.
We need to take these mappings into account when counting the number of
buttons on the device.

Example: A device with BTN_LEFT and BTN_0 and a mapping from 1 -> 7 and 8 ->
2.

BTN_LEFT is mapped to 1. 1 is mapped to 7. num_buttons is 7.
BTN_0 is mapped to 8. 8 is mapped to 2. num_buttons remains 7.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b358f1eb3a)
2009-07-30 09:44:33 +10:00
2008-11-03 13:32:41 +10:30
2009-02-02 19:52:32 -02:00
2009-04-30 16:39:15 +10:00
2009-02-03 19:56:45 +10:00

xf86-input-evdev - Generic Linux input driver for the Xorg X server

Please submit bugs & patches to the Xorg bugzilla:

        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg

All questions regarding this software should be directed at the
Xorg mailing list:

        http://lists.freedesktop.org/mailman/listinfo/xorg

The master development code repository can be found at:

        git://anongit.freedesktop.org/git/xorg/driver/xf86-input-evdev

        http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev

For more information on the git code manager, see:

        http://wiki.x.org/wiki/GitPage
Description
No description provided
Readme 1.2 MiB
Languages
C 96.4%
Makefile 2%
M4 1.4%
Shell 0.2%