The values of wcmVirtualTabletPadding are only read at a single
location. Immediately prior to this read, they are set to zero.
Because a value of zero will have no effect when used, the
[xy]_padding variables are nothing more than dead code.

Signed-off-by: Jason Gerecke <killert...@gmail.com>
---
 src/wcmCommon.c     |  7 -------
 src/xf86Wacom.c     | 17 -----------------
 src/xf86Wacom.h     |  1 -
 src/xf86WacomDefs.h |  2 --
 4 files changed, 27 deletions(-)

diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index ce54c70..87bc76c 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -615,13 +615,6 @@ wcmSendNonPadEvents(InputInfoPtr pInfo, const 
WacomDeviceState *ds,
                 */
                if (!is_absolute(pInfo))
                        valuators[0] *= priv->factorY / priv->factorX;
-               else
-               {
-                       /* Padding virtual values */
-                       wcmVirtualTabletPadding(pInfo);
-                       valuators[0] += priv->leftPadding;
-                       valuators[1] += priv->topPadding;
-               }
 
                /* don't emit proximity events if device does not support 
proximity */
                if ((pInfo->dev->proximity && !priv->oldProximity))
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index 4f41d64..5290c4e 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -90,23 +90,6 @@ static void wcmKbdCtrlCallback(DeviceIntPtr di, KeybdCtrl* 
ctrl)
 }
 
 /*****************************************************************************
- * wcmVirtualTabletPadding(InputInfoPtr pInfo)
- ****************************************************************************/
-
-void wcmVirtualTabletPadding(InputInfoPtr pInfo)
-{
-       WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
-
-       priv->leftPadding = 0;
-       priv->topPadding = 0;
-
-       if (!is_absolute(pInfo)) return;
-
-       DBG(10, priv, "x=%d y=%d \n", priv->leftPadding, priv->topPadding);
-       return;
-}
-
-/*****************************************************************************
  * wcmInitialToolSize --
  *    Initialize logical size and resolution for individual tool.
  ****************************************************************************/
diff --git a/src/xf86Wacom.h b/src/xf86Wacom.h
index 03a0d6a..3f1b028 100644
--- a/src/xf86Wacom.h
+++ b/src/xf86Wacom.h
@@ -152,7 +152,6 @@ extern void wcmSoftOutEvent(InputInfoPtr pInfo);
 
 extern void wcmRotateTablet(InputInfoPtr pInfo, int value);
 extern void wcmRotateAndScaleCoordinates(InputInfoPtr pInfo, int* x, int* y);
-extern void wcmVirtualTabletPadding(InputInfoPtr pInfo);
 
 extern int wcmCheckPressureCurveValues(int x0, int y0, int x1, int y1);
 extern int wcmGetPhyDeviceID(WacomDevicePtr priv);
diff --git a/src/xf86WacomDefs.h b/src/xf86WacomDefs.h
index d04c71b..0894880 100644
--- a/src/xf86WacomDefs.h
+++ b/src/xf86WacomDefs.h
@@ -245,8 +245,6 @@ struct _WacomDeviceRec
        unsigned int serial;    /* device serial number this device takes (if 
0, any serial is ok) */
        unsigned int cur_serial; /* current serial in prox */
        int cur_device_id;      /* current device ID in prox */
-       int leftPadding;        /* left padding for virtual tablet in device 
coordinates*/
-       int topPadding;         /* top padding for virtual tablet in device 
coordinates*/
 
        /* button mapping information
         *
-- 
1.9.1


------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to