[PATCH:xf86-input-acecad 6/6] Remove pointless checks on is_core_pointer.

Cyril Brulebois kibi at debian.org
Wed May 4 17:04:12 PDT 2011


Signed-off-by: Cyril Brulebois <kibi at debian.org>
---
 src/acecad.c |   39 +++++++++++++++++----------------------
 1 files changed, 17 insertions(+), 22 deletions(-)

diff --git a/src/acecad.c b/src/acecad.c
index de2577e..ad6d793 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -729,7 +729,7 @@ ReadInput (InputInfoPtr local)
 {
     int x, y, z;
     int prox, buttons;
-    int is_core_pointer = 0, is_absolute;
+    int is_absolute;
     AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private);
 
     /*xf86Msg(X_INFO, "ACECAD Tablet Read Input\n");*/
@@ -772,11 +772,10 @@ ReadInput (InputInfoPtr local)
         if (prox)
         {
             if (!(priv->acecadOldProximity))
-                if (!is_core_pointer)
-                {
-                    /*xf86Msg(X_INFO, "ACECAD Tablet ProxIN %d %d %d\n",x, y, z);*/
-                    xf86PostProximityEvent(local->dev, 1, 0, 3 , x, y, z);
-                }
+            {
+                /*xf86Msg(X_INFO, "ACECAD Tablet ProxIN %d %d %d\n",x, y, z);*/
+                xf86PostProximityEvent(local->dev, 1, 0, 3 , x, y, z);
+            }
 
             if ((is_absolute && ((priv->acecadOldX != x) || (priv->acecadOldY != y) || (priv->acecadOldZ != z)))
                     || (!is_absolute && (x || y)))
@@ -809,12 +808,11 @@ ReadInput (InputInfoPtr local)
         }
         else
         {
-            if (!is_core_pointer)
-                if (priv->acecadOldProximity)
-                {
-                    /*xf86Msg(X_INFO, "ACECAD Tablet ProxOUT %d %d %d\n",x, y, z);*/
-                    xf86PostProximityEvent(local->dev, 0, 0, 3, x,y,z);
-                }
+            if (priv->acecadOldProximity)
+            {
+                /*xf86Msg(X_INFO, "ACECAD Tablet ProxOUT %d %d %d\n",x, y, z);*/
+                xf86PostProximityEvent(local->dev, 0, 0, 3, x,y,z);
+            }
             priv->acecadOldProximity = 0;
         }
     }
@@ -836,7 +834,6 @@ USBReadInput (InputInfoPtr local)
     int report_x = 0, report_y = 0;
     int prox = priv->acecadOldProximity;
     int buttons = priv->acecadOldButtons;
-    int is_core_pointer = 0;
     /* Is autodev active? */
     int autodev = priv->flags & AUTODEV_FLAG;
     /* Was the device available last time we checked? */
@@ -935,10 +932,9 @@ USBReadInput (InputInfoPtr local)
             report_y = y;
 #endif
             if (!(priv->acecadOldProximity))
-                if (!is_core_pointer)
-                {
-                    xf86PostProximityEvent(local->dev, 1, 0, 3 , report_x, report_y, z);
-                }
+            {
+                xf86PostProximityEvent(local->dev, 1, 0, 3 , report_x, report_y, z);
+            }
 
 
             xf86PostMotionEvent(local->dev, 1, 0, 3, report_x, report_y, z);
@@ -957,11 +953,10 @@ USBReadInput (InputInfoPtr local)
         }
         else
         {
-            if (!is_core_pointer)
-                if (priv->acecadOldProximity)
-                {
-                    xf86PostProximityEvent(local->dev, 0, 0, 3, report_x, report_y, z);
-                }
+            if (priv->acecadOldProximity)
+            {
+                xf86PostProximityEvent(local->dev, 0, 0, 3, report_x, report_y, z);
+            }
             priv->acecadOldProximity = 0;
         }
 
-- 
1.7.4.4



More information about the xorg-devel mailing list