[PATCH] (server-1.6) Xi: don't update VCP's valuators from DeviceValuator events #18882

Peter Hutterer peter.hutterer at who-t.net
Sun Dec 7 20:16:00 PST 2008


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>
---
Not cherry-picked from master as master does need to update the valuators.
(Keith: sorry for the resend, wrong "From:" blocked deliver to the xorg list)

 Xi/exevents.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Xi/exevents.c b/Xi/exevents.c
index 00a6b21..8eef400 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
-- 
1.6.0.4



More information about the xorg mailing list