Hi,
It appears that some part of the device-information is not re-read when
wacom_drv is re-opening the device after it has closed it. Ponder the
situation:
* Start with having one tablet connected.
* Pull it out and wacom_drv will detect this and close the device.
* Attach a different tablet with other X/Y parameters.
* Switch to another VT and back to get wacom_drv to open it again.
After this sequence of events wacom_drv will still use the maximum X/Y from
the first tablet. This seems to be a caching issue in xf86Wacom.c and
wcmUSB.c.
Context-diff included on the fixes I made to get a correct behaviour.
BR
Magnus
--- src/xf86Wacom.c.old 2006-06-29 18:57:25.000000000 +0200
+++ src/xf86Wacom.c 2006-06-29 23:57:49.000000000 +0200
@@ -209,10 +209,12 @@
int totalWidth = 0, maxHeight = 0, tabletSize = 0;
double screenRatio, tabletRatio;
char m1[32], m2[32];
+ int devwasclosed = 0;
/* open file, if not already open */
if (local->fd < 0)
{
+ devwasclosed=1;
if (!xf86WcmInitDevice(local) || (local->fd < 0))
{
DBG(1,ErrorF("Failed to initialize device\n"));
@@ -221,7 +223,8 @@
}
/* if factorX is not set, initialize bounding rect */
- if (priv->factorX == 0.0)
+ /* if the device was closed (user may have switch tablet), re-init bounding rect */
+ if (priv->factorX == 0.0 || devwasclosed != 0)
{
if (priv->twinview != TV_NONE && priv->screen_no == -1)
{
--- src/wcmUSB.c.old 2006-06-29 23:52:54.000000000 +0200
+++ src/wcmUSB.c 2006-06-29 23:53:10.000000000 +0200
@@ -492,7 +492,7 @@
}
/* max x */
- if (common->wcmMaxX == 0)
+ /*if (common->wcmMaxX == 0)*/
{
if (ioctl(local->fd, EVIOCGABS(ABS_X), nValues) < 0)
{
@@ -508,7 +508,7 @@
}
/* max y */
- if (common->wcmMaxY == 0)
+ /*if (common->wcmMaxY == 0)*/
{
if (ioctl(local->fd, EVIOCGABS(ABS_Y), nValues) < 0)
{
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Linuxwacom-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-discuss