Don't stop processing events when a valuator's mode doesn't match the 0th valuator's mode. Instead, start with the first_valuator in the event and keep stacking them on until the first valuator with a different mode is hit.
Signed-off-by: Peter Hutterer <[email protected]> --- dix/eventconvert.c | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/dix/eventconvert.c b/dix/eventconvert.c index b92169e..dd17898 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -324,14 +324,16 @@ countValuators(DeviceEvent *ev, int *first) for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++) { - /* Assume mode of 0th valuator matches XI1 device mode. Stop when the - * event mode changes since XI1 can't handle mixed mode devices. - */ - if (BitIsOn(ev->valuators.mode, i) != BitIsOn(ev->valuators.mode, 0)) - break; - if (BitIsOn(ev->valuators.mask, i)) { + /* Assume mode of first_valuator matches XI1 device mode. Stop when the + * event mode changes since XI1 can't handle mixed mode devices. + */ + if (first_valuator > -1 && + BitIsOn(ev->valuators.mode, i) != + BitIsOn(ev->valuators.mode, first_valuator)) + break; + if (first_valuator == -1) first_valuator = i; last_valuator = i; -- 1.7.3.2 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
