xserver: Branch 'master'
Peter Hutterer
whot at kemper.freedesktop.org
Mon Jan 7 17:43:40 PST 2008
dix/getevents.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 981bb9f1e33e4564d1b59c00c808cc43a2e9497b
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 40fc7f2..12cb950 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -346,7 +346,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