diff options
author | marha <marha@users.sourceforge.net> | 2011-04-07 07:41:54 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-07 07:41:54 +0000 |
commit | de1c6801fc854692d39fb2f8d53bf54ab25a1287 (patch) | |
tree | 884c4234434a8da73bd62ef44799b49c752ecd66 /xorg-server/dix/eventconvert.c | |
parent | 704e01fc69ebf6302aa1876906805147248abdaa (diff) | |
download | vcxsrv-de1c6801fc854692d39fb2f8d53bf54ab25a1287.tar.gz vcxsrv-de1c6801fc854692d39fb2f8d53bf54ab25a1287.tar.bz2 vcxsrv-de1c6801fc854692d39fb2f8d53bf54ab25a1287.zip |
xserver pixman mesa git update 7 Apr 2011
Diffstat (limited to 'xorg-server/dix/eventconvert.c')
-rw-r--r-- | xorg-server/dix/eventconvert.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/xorg-server/dix/eventconvert.c b/xorg-server/dix/eventconvert.c index a5fe0a9cc..14731f4f6 100644 --- a/xorg-server/dix/eventconvert.c +++ b/xorg-server/dix/eventconvert.c @@ -383,12 +383,12 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) int i; int state = 0; int first_valuator, num_valuators; - DeviceIntPtr dev = NULL; num_valuators = countValuators(ev, &first_valuator); if (num_valuators > 0) { + DeviceIntPtr dev = NULL; dixLookupDevice(&dev, ev->deviceid, serverClient, DixUseAccess); /* State needs to be assembled BEFORE the device is updated. */ state = (dev && dev->key) ? XkbStateFieldFromRec(&dev->key->xkbInfo->state) : 0; @@ -405,14 +405,10 @@ getValuatorEvents(DeviceEvent *ev, deviceValuator *xv) xv->deviceid = ev->deviceid; xv->device_state = state; - for (j = 0; j < xv->num_valuators; j++) { - if (BitIsOn(ev->valuators.mask, xv->first_valuator + j)) - valuators[j] = ev->valuators.data[xv->first_valuator + j]; - else if (dev->valuator->axes[xv->first_valuator + j].mode == Absolute) - valuators[j] = dev->valuator->axisVal[xv->first_valuator + j]; - else - valuators[j] = 0; - } + /* Unset valuators in masked valuator events have the proper data values + * in the case of an absolute axis in between two set valuators. */ + for (j = 0; j < xv->num_valuators; j++) + valuators[j] = ev->valuators.data[xv->first_valuator + j]; if (i + 6 < num_valuators) xv->deviceid |= MORE_EVENTS; |