summaryrefslogtreecommitdiff
path: root/src/xdrv
diff options
context:
space:
mode:
authorpingc <pingc>2008-12-02 00:27:48 +0000
committerpingc <pingc>2008-12-02 00:27:48 +0000
commit987fcf7c814bd60a981616d2ec3833f8d0c15ed9 (patch)
treec8b9b2bee52be1c33361fb85b414828bc2f0b3a0 /src/xdrv
parentcf1959686dbf7e3aa1a52001bf7660fbe11ccbd5 (diff)
downloadxf86-input-wacom-987fcf7c814bd60a981616d2ec3833f8d0c15ed9.tar.gz
Workaround for Xorg 1.5release-0.8.2
Diffstat (limited to 'src/xdrv')
-rwxr-xr-xsrc/xdrv/wcmCommon.c7
-rwxr-xr-xsrc/xdrv/wcmISDV4.c13
-rwxr-xr-xsrc/xdrv/xf86Wacom.c15
3 files changed, 22 insertions, 13 deletions
diff --git a/src/xdrv/wcmCommon.c b/src/xdrv/wcmCommon.c
index 812a789..ff834f4 100755
--- a/src/xdrv/wcmCommon.c
+++ b/src/xdrv/wcmCommon.c
@@ -266,7 +266,7 @@ static void xf86WcmSendButtons(LocalDevicePtr local, int buttons, int rx, int ry
"buttons=%d for %s\n", buttons, local->name));
/* Tablet PC buttons. */
- if ( common->wcmTPCButton && !IsCursor(priv) && !IsPad(priv) && !IsEraser(priv) )
+ if ( common->wcmTPCButton && !IsCursor(priv) && !IsPad(priv) )
{
if ( buttons & 1 )
{
@@ -991,10 +991,7 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds)
xf86PostMotionEvent(local->dev, is_absolute,
0, naxes, x, y, z, v3, v4, v5);
- if (priv->oldProximity || !IsTouch(priv))
- sendCommonEvents(local, ds, x, y, z, v3, v4, v5);
- else
- buttons = 0;
+ sendCommonEvents(local, ds, x, y, z, v3, v4, v5);
}
/* not in proximity */
diff --git a/src/xdrv/wcmISDV4.c b/src/xdrv/wcmISDV4.c
index 67a001b..5e030b3 100755
--- a/src/xdrv/wcmISDV4.c
+++ b/src/xdrv/wcmISDV4.c
@@ -233,6 +233,11 @@ static int isdv4GetRanges(LocalDevicePtr local)
if (isdv4Query(local, WC_ISDV4_TOUCH_QUERY, data) == Success)
{
/* (data[2] & 0x07) == 0 is for resistive touch */
+ if (!(data[2] & 0x07) && data[1])
+ {
+ common->wcmMaxTouchX = common->wcmMaxTouchY = (int)(1 << data[1]);
+ }
+
if ((data[0] & 0x41) && (data[2] & 0x07))
{
/* tablet model */
@@ -292,10 +297,10 @@ static int isdv4GetRanges(LocalDevicePtr local)
if (common->wcmMaxX && common->wcmMaxY && !common->wcmTouchResolX)
{
/* Some touch tablet don't report physical size */
- common->wcmTouchResolX = common->wcmMaxTouchX /
- (common->wcmResolX * common->wcmMaxX);
- common->wcmTouchResolY = common->wcmMaxTouchY /
- (common->wcmResolY * common->wcmMaxY);
+ common->wcmTouchResolX = (int)((double)(common->wcmMaxTouchX *
+ common->wcmResolX) / (double)common->wcmMaxX + 0.5);
+ common->wcmTouchResolY = (int)((double)(common->wcmMaxTouchY *
+ common->wcmResolY) / (double)common->wcmMaxY + 0.5);
}
}
diff --git a/src/xdrv/xf86Wacom.c b/src/xdrv/xf86Wacom.c
index 9bdbef8..7b61113 100755
--- a/src/xdrv/xf86Wacom.c
+++ b/src/xdrv/xf86Wacom.c
@@ -73,9 +73,10 @@
* 2008-07-09 47-pc0.8.1 - new release
* 2008-07-17 47-pc0.8.1-1 - Support USB TabletPC
* 2008-08-27 47-pc0.8.1-4 - Support Bamboo1 Meadium and Monarch
+ * 2008-11-11 47-pc0.8.2 - new release
*/
-static const char identification[] = "$Identification: 47-0.8.1-6 $";
+static const char identification[] = "$Identification: 47-0.8.2 $";
/****************************************************************************/
@@ -531,8 +532,14 @@ static int xf86WcmRegisterX11Devices (LocalDevicePtr local)
nbaxes = priv->naxes; /* X, Y, Pressure, Tilt-X, Tilt-Y, Wheel */
nbbuttons = priv->nbuttons; /* Use actual number of buttons, if possible */
- nbkeys = nbbuttons; /* Same number of keys since any button may be */
- /* configured as an either mouse button or key */
+ nbkeys = nbbuttons; /* Same number of keys since any button may be
+ * configured as an either mouse button or key */
+
+ if (!nbbuttons)
+ nbbuttons = nbkeys = 1; /* Xserver 1.5 or later crashes when
+ * nbbuttons = 0 while sending a beep
+ * This is only a workaround.
+ */
DBG(10, priv->debugLevel, ErrorF("xf86WcmRegisterX11Devices "
"(%s) %d buttons, %d keys, %d axes\n",
@@ -757,7 +764,7 @@ char *xf86WcmEventAutoDevProbe (LocalDevicePtr local)
ErrorF("%s waiting 100 msec (total %dms) for device to become ready\n", local->name, wait);
usleep(100*1000);
}
- ErrorF("%s no synaptics event device found (checked %d nodes, waited %d msec)\n",
+ ErrorF("%s no Wacom event device found (checked %d nodes, waited %d msec)\n",
local->name, i + 1, wait);
return FALSE;
}