xserver: Branch 'mpx'

Peter Hutterer whot at kemper.freedesktop.org
Mon Dec 17 19:50:54 PST 2007


 dix/getevents.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9f6ae61ad12cc2813d04405458e1ca5aed8a539e
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.

diff --git a/dix/getevents.c b/dix/getevents.c
index 9f955cf..f21bb1b 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -392,7 +392,7 @@ getValuatorEvents(EventList *events, DeviceIntPtr pDev, int first_valuator,
         xv = (deviceValuator*)events->event;
         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