From: Chris Bagwell <[email protected]> maxWidth and maxHeight are no longer set and this causes relative devices to not work (factor* = 0 which scales to zero values always).
bottomX/bottomY is meant to be a value that optionally contains scaling information that can be passed to xf86AxisScale() to scale from tablet to screen ratios. See wcmInitArea() for how that is done. Derive the scaling factor from bottomX/bottomY. Since this normally 1:1, the code is rarely used. This patch fixes a regression where Bamboo touch device would not move cursor any more. Signed-off-by: Chris Bagwell <[email protected]> Reviewed-by: Peter Hutterer <[email protected]> --- src/wcmCommon.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wcmCommon.c b/src/wcmCommon.c index f060a7b..cbf8e2b 100644 --- a/src/wcmCommon.c +++ b/src/wcmCommon.c @@ -98,13 +98,13 @@ void wcmMappingFactor(InputInfoPtr pInfo) priv->bottomX, priv->bottomY, priv->sizeX, priv->sizeY, priv->maxWidth, priv->maxHeight); - /* maxWidth and maxHeight are size of screen. So factorX and - * factorY are screen units per tool units and is used - * later to scale tool movement on tablet to cursor movement - * on the scree. + /* bottomX/bottomY are scaled values of maxX/maxY such that it + * will scale tablet to screen ratio when passed to xf86AxisScale(). + * Use this to compute similar factor for scaling in relative + * mode. If screen:tablet are 1:1 ratio then no scaling. */ - priv->factorX = (double)priv->maxWidth / (double)priv->sizeX; - priv->factorY = (double)priv->maxHeight / (double)priv->sizeY; + priv->factorX = (double)priv->sizeX / (double)priv->bottomX; + priv->factorY = (double)priv->sizeY / (double)priv->bottomY; DBG(2, priv, "X factor = %.3g, Y factor = %.3g\n", priv->factorX, priv->factorY); } -- 1.7.3.4 ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
