diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2008-12-08 14:16:00 +1000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-12-16 12:03:04 -0800 |
commit | 9a44cc619f3296b0faca97b0959e19c208f143bb (patch) | |
tree | 175bb1f2af3dfb0d7d0cdb754a047cfc12d9393c /Xi | |
parent | c7fffe9e1354f816b6e2adedff045999fba9f1be (diff) |
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>
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/exevents.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index a976802a2..1b60099d6 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -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 |