[PATCH 1/3] evdev: Revert "Set all valuators for relative motion events (#24737)"

Bartosz Brachaczek b.brachaczek at gmail.com
Tue Aug 10 13:31:00 PDT 2010


It isn't necessary to post zero-deltas to X Server. In order not to post
uninitialized "v" array we should rather simply initialize it.

This reverts commit c1f16a4f59a584ab4546c2f16e20b06703042057.

Signed-off-by: Bartosz Brachaczek <b.brachaczek at gmail.com>
---
 src/evdev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index cd0fb6c..18f3fb7 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -386,7 +386,7 @@ EvdevProcessValuators(InputInfoPtr pInfo, int
v[MAX_VALUATORS], int *num_v,
         for (i = 0; i < REL_CNT; i++)
         {
             int map = pEvdev->axis_map[i];
-            if (map != -1)
+            if (pEvdev->delta[i] && map != -1)
             {
                 v[map] = pEvdev->delta[i];
                 if (map < first)
-- 
1.7.2


More information about the xorg-devel mailing list