xf86-input-evdev: Changes to 'master'
Peter Hutterer
whot at kemper.freedesktop.org
Wed May 20 23:12:15 PDT 2009
src/emuWheel.c | 8 ++++----
src/evdev.c | 26 +++++++++++++++-----------
src/evdev.h | 2 +-
3 files changed, 20 insertions(+), 16 deletions(-)
New commits:
commit 255b9f6bbf374a315750019c6fadc5f82fb7d41d
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu May 21 10:23:37 2009 +1000
Only initialize the number of buttons we actually have.
This takes into account driver-configured button mappings, i.e. if device
with one button has this button mapped to 25 through the ButtonMapping
option, the X server will think the device has result 25 buttons.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
commit aa117d49a5139bcc453e6ab022b67347464a8acd
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Thu May 21 09:51:57 2009 +1000
Rename pEvdev->buttons to pEvdev->num_buttons for clarity.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
commit b358f1eb3a4ef8fdee099114d6c70d6ea06eba95
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Wed May 20 11:57:01 2009 +1000
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 at who-t.net>
commit 33cc112ca1af377a85cfeb05dfb72f07d3850a95
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Wed May 20 11:47:37 2009 +1000
Up the number of button labels atoms to EVDEV_MAXBUTTONS.
Button labels would smash memory if the device had less than 4 buttons and
did not advertise a wheel event. In this case the hard-coded wheel button
labels would write past the atoms[] boundary.
Potential memory smash if a device had a BTN_LEFT and BTN_0, since the
latter would map to 8, regardless of the the number of actual buttons
(same with BTN_MIDDLE and BTN_1 or BTN_RIGHT and BTN_2).
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
commit 3c43d880f13725a04fcd7c0c8d5978a36208e373
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Wed May 20 11:42:35 2009 +1000
Only label axes and buttons if the device has axes or buttons.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
More information about the xorg-commit
mailing list