[PATCH:xf86-input-acecad 6/6] Remove pointless checks on is_core_pointer.
Peter Hutterer
peter.hutterer at who-t.net
Wed May 4 17:47:19 PDT 2011
On Thu, May 05, 2011 at 02:04:12AM +0200, Cyril Brulebois wrote:
> Signed-off-by: Cyril Brulebois <kibi at debian.org>
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> for the series
Feel free to push these once the requires is updated.
Cheers,
Peter
> ---
> 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
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>
More information about the xorg-devel
mailing list