[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-input-mutouch: Changes to 'debian-unstable'



 debian/changelog  |   10 ++++++++++
 src/xf86MuTouch.c |   25 ++++++++++++++++++++++---
 2 files changed, 32 insertions(+), 3 deletions(-)

New commits:
commit d21418a028639b2f5de58f4fb66178d62f2b6757
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Sep 29 15:28:22 2008 +0200

    Prepare changelog for upload

diff --git a/debian/changelog b/debian/changelog
index b9a061f..c8f763c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+xserver-xorg-input-mutouch (1:1.2.0-2) unstable; urgency=medium
+
+  * Cherry-picked from upstream: Handle axis inversion in the driver.
+    The current X server doesn't handle inverted axes, so we need to do it in
+    the driver. Report valid axis ranges to the server, but flip the
+    coordinates before posting events.
+    LP: #275650, fd.o bug#17813.
+
+ -- Julien Cristau <jcristau@debian.org>  Mon, 29 Sep 2008 15:23:22 +0200
+
 xserver-xorg-input-mutouch (1:1.2.0-1) unstable; urgency=low
 
   * New upstream release.

commit eb5c8b987ae3204d3479d22cfcabdda67de2a783
Author: Peter Hutterer <peter@cs.unisa.edu.au>
Date:   Sat Jun 21 23:15:14 2008 +0930

    Fix stupid typos from last patch.
    
    Don't mis-use a boolean as temporary variable either.
    (cherry picked from commit c2a2c40506a57aa6d9e92e6dce372165c132eb85)

diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
index 45451ba..37caa7a 100644
--- a/src/xf86MuTouch.c
+++ b/src/xf86MuTouch.c
@@ -1800,19 +1800,21 @@ xf86MuTInit(InputDriverPtr	drv,
   xf86Msg(X_CONFIG, "Microtouch device will work in %s mode\n", str);      
   
   if (priv->max_x - priv->min_x <= 0) {
+    int tmp;
     xf86Msg(X_INFO, "MicroTouch: reverse x mode (minimum x position >= maximum x position)\n");
-    priv->x_inverted = priv->max_x; /* X server doesn't do inverted by itself*/
+    tmp              = priv->max_x; /* X server doesn't do inverted by itself*/
     priv->max_x      = priv->min_x;
-    priv->min_x      = priv->max_x;
+    priv->min_x      = tmp;
     priv->x_inverted = TRUE;
   } else
     priv->x_inverted = FALSE;
 
   if (priv->max_y - priv->min_y <= 0) {
+    int tmp;
     xf86Msg(X_INFO, "MicroTouch: reverse y mode (minimum y position >= maximum y position)\n");
-    priv->y_inverted = priv->max_y;
+    tmp              = priv->max_y;
     priv->max_y      = priv->min_y;
-    priv->min_y      = priv->max_y;
+    priv->min_y      = tmp;
     priv->y_inverted = TRUE;
   } else
     priv->y_inverted = FALSE;

commit b9c4f6d64f10e1ae4b511a8a3d2bd8f19ef030d8
Author: Peter Hutterer <peter@cs.unisa.edu.au>
Date:   Thu Jun 12 21:27:32 2008 +0930

    Handle axis inversion in the driver.
    
    The current X server doesn't handle inverted axes, so we need to do it in the
    driver. Report valid axis ranges to the server, but flip the coordinates
    before posting events.
    
    Untested for lack of device.
    (cherry picked from commit 7ada6945af8c690e629bfc4ad6fe19b49cbbb66e)
    
    Conflicts:
    
            src/xf86MuTouch.c

diff --git a/src/xf86MuTouch.c b/src/xf86MuTouch.c
index 0795e35..45451ba 100644
--- a/src/xf86MuTouch.c
+++ b/src/xf86MuTouch.c
@@ -320,6 +320,8 @@ typedef struct _MuTPrivateRec {
   int			max_x;		/* Maximum x					*/
   int			min_y;		/* Minimum y reported by calibration		*/
   int			max_y;		/* Maximum y					*/
+  int			x_inverted;     /* X axis inverted?				*/
+  int			y_inverted;     /* Y axis inverted?				*/
 #ifndef XFREE86_V4
   int			link_speed;	/* Speed of the RS232 link connecting the ts.	*/
 #endif
@@ -787,6 +789,10 @@ xf86MuTReadInput(LocalDevicePtr	local)
 	 * Emit a motion. If in core pointer mode we need to calibrate
 	 * or we will feed X with quite bogus event positions.
 	 */
+        if (priv->x_inverted)
+          cur_x = priv->max_x - cur_x;
+        if (priv->y_inverted)
+          cur_y = priv->max_y - cur_y;
 	xf86PostMotionEvent(local_to_use->dev, TRUE, 0, 2, cur_x, cur_y);
 	
 	/*
@@ -1795,10 +1801,21 @@ xf86MuTInit(InputDriverPtr	drv,
   
   if (priv->max_x - priv->min_x <= 0) {
     xf86Msg(X_INFO, "MicroTouch: reverse x mode (minimum x position >= maximum x position)\n");
-  }  
+    priv->x_inverted = priv->max_x; /* X server doesn't do inverted by itself*/
+    priv->max_x      = priv->min_x;
+    priv->min_x      = priv->max_x;
+    priv->x_inverted = TRUE;
+  } else
+    priv->x_inverted = FALSE;
+
   if (priv->max_y - priv->min_y <= 0) {
-    xf86Msg(X_INFO, "MicroTouch: reverse y mode (minimum y position >= maximum y position)\n");    
-  }
+    xf86Msg(X_INFO, "MicroTouch: reverse y mode (minimum y position >= maximum y position)\n");
+    priv->y_inverted = priv->max_y;
+    priv->max_y      = priv->min_y;
+    priv->min_y      = priv->max_y;
+    priv->y_inverted = TRUE;
+  } else
+    priv->y_inverted = FALSE;
 
   if (portrait == 1) {
     /*


Reply to: