xserver: Branch 'server-1.4-branch'
Daniel Stone
daniels at kemper.freedesktop.org
Mon Jan 28 19:45:31 PST 2008
dix/getevents.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit e98027c3ac7195fec665ef393d980b02870ca1b8
Author: Peter Hutterer <peter at cs.unisa.edu.au>
Date: Tue Dec 18 13:57:07 2007 +1030
dix: set the correct number of valuators in valuator events.
(first_valuator + num_valuators) must never be larger than the number of axes,
otherwise DIX freaks out. And from looking at libXI, anything larger than 6 is
wrong too.
(cherry picked from commit 9f6ae61ad12cc2813d04405458e1ca5aed8a539e)
diff --git a/dix/getevents.c b/dix/getevents.c
index 12d8189..b7ba69b 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -344,7 +344,7 @@ getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator,
for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) {
xv->type = DeviceValuator;
xv->first_valuator = i;
- xv->num_valuators = num_valuators;
+ xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i);
xv->deviceid = pDev->id;
switch (final_valuator - i) {
case 6:
More information about the xorg-commit
mailing list