diff options
author | Ping Cheng <pingc@wacom.com> | 2009-12-22 17:59:41 -0800 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-12-24 09:01:05 +1000 |
commit | 82408de786df12efa1f5f0ec9d0f5754f9c61bf7 (patch) | |
tree | 1d0590703ab53a065b72bb4e270b34f6c97bde72 | |
parent | 72c69cfc60d6b762415828930a63e485aa00185f (diff) | |
download | xf86-input-wacom-82408de786df12efa1f5f0ec9d0f5754f9c61bf7.tar.gz |
Validate the active tablet area before initializing the area
Signed-off-by: Ping Cheng <pinglinux@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | src/xf86Wacom.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c index 254d591..cf06e4d 100644 --- a/src/xf86Wacom.c +++ b/src/xf86Wacom.c @@ -150,30 +150,31 @@ static int xf86WcmInitArea(LocalDevicePtr local) DBG(10, priv, "\n"); - /* Verify Box */ + /* the following 4 blocks verify the box and + * initialize the area */ if (priv->topX > bottomx) { - area->topX = priv->topX = 0; + priv->topX = 0; } + area->topX = priv->topX; if (priv->topY > bottomy) { - area->topY = priv->topY = 0; + priv->topY = 0; } + area->topY = priv->topY; - /* set unconfigured bottom to max */ - priv->bottomX = xf86SetIntOption(local->options, "BottomX", 0); if (priv->bottomX < priv->topX || !priv->bottomX) { - area->bottomX = priv->bottomX = bottomx; + priv->bottomX = bottomx; } + area->bottomX = priv->bottomX; - /* set unconfigured bottom to max */ - priv->bottomY = xf86SetIntOption(local->options, "BottomY", 0); if (priv->bottomY < priv->topY || !priv->bottomY) { - area->bottomY = priv->bottomY = bottomy; + priv->bottomY = bottomy; } + area->bottomY = priv->bottomY; if (priv->twinview != TV_NONE) priv->numScreen = 2; |