Xi: don't update VCP's valuators from DeviceValuator events #18882

The VCP doesn't need to update the valuators anyway since it cannot send XI
events. Just skip that bit.

X.Org Bug 18882 <http://bugs.freedesktop.org/show_bug.cgi?id=18882>

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Peter Hutterer 2008-12-08 14:16:00 +10:00 committed by Keith Packard
parent c7fffe9e13
commit 9a44cc619f

View file

@ -781,12 +781,14 @@ UpdateDeviceState(DeviceIntPtr device, xEvent* xE, int count)
}
/* Update device axis */
for (i = 1; i < count; i++) {
/* Don't update valuators for the VCP, it never sends XI events anyway */
for (i = 1; !device->isMaster && i < count; i++) {
if ((++xV)->type == DeviceValuator) {
int *axisvals;
int first = xV->first_valuator;
BOOL change = FALSE;
if (xV->num_valuators &&
(!v || (xV->num_valuators &&
(first + xV->num_valuators > v->numAxes))))
@ -1009,7 +1011,9 @@ ProcessOtherEvent(xEventPtr xE, DeviceIntPtr device, int count)
}
/* Valuator event handling */
for (i = 1; i < count; i++) {
/* Don't care about valuators for the VCP, it never sends XI events */
for (i = 1; !device->isMaster && i < count; i++) {
if ((++xV)->type == DeviceValuator) {
int first = xV->first_valuator;
if (xV->num_valuators