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 9f6ae61ad1
)
This commit is contained in:
parent
260505e3c5
commit
981bb9f1e3
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user