Mice with a lot of buttons (e.g. Logitech MX1000) generate button events greater than BTN_TASK.

Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
(cherry picked from commit 0830676a0c)
This commit is contained in:
Ander Conselvan de Oliveira
2008-06-26 14:36:58 -03:00
committed by Peter Hutterer
parent b125b834f4
commit 52fc8ee846

View File

@@ -252,8 +252,15 @@ EvdevReadInput(InputInfoPtr pInfo)
break;
default:
if (ev.code > BTN_TASK && ev.code < KEY_OK)
if (ev.code > BTN_TASK && ev.code < KEY_OK) {
/* Some fancy mice with a lot of buttons generate
* button events between BTN_TASK and BTN_JOYSTICK */
if (ev.code < BTN_JOYSTICK)
xf86PostButtonEvent(pInfo->dev, 0,
ev.code - BTN_LEFT + 5,
value, 0, 0);
break;
}
PostKbdEvent(pInfo, &ev, value);
break;