[PATCH 1/4] dix: deal with first_valuator > 0 correctly if POINTER_SCREEN is set

Thomas Jaeger ThJaeger at gmail.com
Mon Jun 22 10:00:37 PDT 2009


---
 dix/getevents.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/dix/getevents.c b/dix/getevents.c
index 7c018c1..1c8d683 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1050,11 +1050,12 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons,
         if (flags & POINTER_SCREEN) /* valuators are in screen coords */
         {
 
-            valuators[0] = rescaleValuatorAxis(valuators[0], NULL,
-                    pDev->valuator->axes + 0,
-                    scr->width);
-            if (num_valuators > 1)
-                valuators[1] = rescaleValuatorAxis(valuators[1], NULL,
+            if (num_valuators >= 1 && first_valuator == 0)
+                valuators[0] = rescaleValuatorAxis(valuators[0], NULL,
+                        pDev->valuator->axes + 0,
+                        scr->width);
+            if (first_valuator <= 1 && num_valuators >= (2 - first_valuator))
+                valuators[1 - first_valuator] = rescaleValuatorAxis(valuators[1 - first_valuator], NULL,
                         pDev->valuator->axes + 1,
                         scr->height);
         }
-- 
1.6.3.1


--------------020008020102010507080100
Content-Type: text/x-patch;
 name="0002-dix-do-away-with-an-instance-of-temporary-in-place-m.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename*0="0002-dix-do-away-with-an-instance-of-temporary-in-place-m.pa";
 filename*1="tch"



More information about the xorg-devel mailing list