From 9385ae905aca9e679e698f0491e0bf7e30a35092 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Fri, 3 Jun 2011 15:59:16 +0200 Subject: Remove pointless checks on is_core_pointer. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Cyril Brulebois --- src/acecad.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3