diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | README | 28 | ||||
-rw-r--r-- | configure.in | 6 | ||||
-rwxr-xr-x | prebuilt/install | 7 | ||||
-rwxr-xr-x | prebuilt/uninstall | 12 | ||||
-rwxr-xr-x | src/util/Makefile.am | 6 | ||||
-rwxr-xr-x | src/util/xidump.c | 2 | ||||
-rwxr-xr-x | src/util/xsetwacom.c | 2 | ||||
-rwxr-xr-x | src/xdrv/wcmCommon.c | 18 | ||||
-rwxr-xr-x | src/xdrv/wcmCompat.c | 9 | ||||
-rwxr-xr-x | src/xdrv/wcmConfig.c | 18 | ||||
-rwxr-xr-x | src/xdrv/wcmUSB.c | 33 | ||||
-rwxr-xr-x | src/xdrv/xf86Wacom.c | 15 | ||||
-rwxr-xr-x | src/xdrv/xf86Wacom.h | 2 |
14 files changed, 112 insertions, 53 deletions
@@ -1,3 +1,10 @@ +2009-04-03 Ping Cheng <pingc@wacom.com> + * Support kernels 2.6.28 and 2.6.29 + * Added 10-linuxwacom.fdi from Peter Hutterer + * Updated install/uninstall and util/Makefile.am to support HAL + * Patch 2653689 from Peter Hutterer + * Label 0.8.3-2 + 2009-03-26 Ping Cheng <pingc@wacom.com> * Patch "Don't touch the button map" from Thomas Jaeger * Patch 2653696 from Matthew Garret @@ -1,14 +1,17 @@ README -July 09, 2007 +April 03, 2009 ============================================================================== -Most end users would probably only need to update the Wacom X driver and the /etc/X11/xorg.conf file to use the rich features that Wacom tablets offer. The steps could be as simple as: +Most end users would probably only need to update the Wacom X driver and the +/etc/X11/xorg.conf file to use the rich features that Wacom tablets offer. +The steps could be as simple as: download the package then $ bunzip2 linuxwacom.tar.bz2 $ tar xvf linuxwacom.tar $ cd linuxwacom/prebuilt $ su + # yum remove linuxwacom # ./uninstall # ./install # cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak @@ -17,7 +20,9 @@ download the package then ============================================================================== -However, if you have a USB tablet which is newer than your running kernel, i.e., the tablet is not supported by your running kernel, or you are a developer who is willing to build the driver from the source, there are extra work waiting for you. +However, if you have a USB tablet which is newer than your running kernel, i.e., +the tablet is not supported by your running kernel, or you are a developer who is +willing to build the driver from the source, there are extra work waiting for you. ============================================================================== @@ -31,24 +36,25 @@ As you would expect, run configure and make. Configure options are explained be CONFIGURE OPTIONS: -This file contains hints for building the sources. There are a number of -build targets, some of which are not built automatically. Here is the +This file contains hints for building the sources. There are a number of build + targets, some of which are not built automatically. Here is the breakdown: wacom.o: not built by default (--enable-wacom, --disable-wacom) wacdump: built by default (--enable-wacdump, --disable-wacdump) - hid.o: not built by default (--enable-hid, --disable-hid) - evdev.o: not built by default (--enable-evdev, --disable-evdev for kernel 2.4.x only) - mousedev.o: not built by default (--enable-mousedev, --disable-mousedev. It is used for kernel 2.4.x only) - usbmouse.o: not built by default (--enable-usbmouse, --disable-usbmouse. It is used for kernel 2.4.x only) - input.o: not built by default (--enable-input, --disable-input. It is used for kernel 2.4.x only) + xidump: built by default (--enable-xidump, --disable-xidump) + xsetwacom: built by default (--enable-xsetwacom, --disable-xsetwacom) + hid.o: not built by default (--enable-hid, --disable-hid; Only kernels 2.6.18 or older need it.) wacom_drv.o: built by default (--enable-wacomdrv, --disable-wacomdrv) There are many options, and configure will attempt to guess the correct values for most of them. By default, only wacomcpl, xsetwacom, wacom_drv.o, xidump, and wacdump program are built. -Please surf the HOWTO page at http://linuxwacom.sf.net/index.php/howto/main to find the proper options if the default building environment doesn't work for you. +Please surf the HOWTO page at http://linuxwacom.sf.net/index.php/howto/main +(or the miniHOWTO at http://linuxwacom.sourceforge.net/index.php/minihowto if +you run a Fedora system) to find the proper options if the default building +environment doesn't work for you. ============================================================================== diff --git a/configure.in b/configure.in index 33de1a4..578520a 100644 --- a/configure.in +++ b/configure.in @@ -178,10 +178,11 @@ else 22|23) WCM_KERNEL_VER="2.6.22";; 24|25) WCM_KERNEL_VER="2.6.24";; 26) WCM_KERNEL_VER="2.6.26";; - *) WCM_KERNEL_VER="2.6.27";; + 27) WCM_KERNEL_VER="2.6.27";; + *) WCM_KERNEL_VER="2.6.28";; esac else - AC_MSG_WARN([support for kernels older than 2.6.9 has been dropped after 0.7.4]) + AC_MSG_WARN([support for kernels older than 2.6.9 has been dropped after 0.8.2]) fi else AC_MSG_WARN(kernel version $MODUTS not supported) @@ -962,6 +963,7 @@ AC_OUTPUT(Makefile src/2.6.24/Makefile src/2.6.26/Makefile src/2.6.27/Makefile + src/2.6.28/Makefile src/wacomxi/Makefile src/wacomxi/wacomcpl) diff --git a/prebuilt/install b/prebuilt/install index 087db20..1d190b1 100755 --- a/prebuilt/install +++ b/prebuilt/install @@ -93,6 +93,13 @@ if [ -n "$drv" ]; then /usr/bin/install -c xidump /usr/local/bin/xidump /usr/bin/install -c .libs/xsetwacom /usr/local/bin/xsetwacom echo "Installed under /usr/local/bin" + test -z "/usr/local/libexec" || /bin/mkdir -p "/usr/local/libexec" + /usr/bin/install -c hal-setup-wacom /usr/local/libexec/hal-setup-wacom + test -z "/usr/local/share/hal/fdi/policy/20thirdparty" || /bin/mkdir -p "/usr/local/share/hal/fdi/policy/20thirdparty" + /usr/bin/install -c '10-linuxwacom.fdi' '/usr/local/share/hal/fdi/policy/20thirdparty/10-linuxwacom.fdi' + echo "hal-setup-wacom installed under /usr/local/libexec" + echo "10-linuxwacom.fdi installed under /usr/local/share/hal/fdi/policy/20thirdparty" + test -z "/usr/local/include/wacomcfg" || /bin/mkdir -p "/usr/local/include/wacomcfg" test -z "/usr/local/include/wacomcfg" || mkdir -p -- "/usr/local/include/wacomcfg" /usr/bin/install -c -m 644 'wacomcfg.h' '/usr/local/include/wacomcfg/wacomcfg.h' echo diff --git a/prebuilt/uninstall b/prebuilt/uninstall index 1da59e2..fcc7924 100755 --- a/prebuilt/uninstall +++ b/prebuilt/uninstall @@ -7,6 +7,8 @@ if [ "$(id -u)" != "0" ]; then exit fi +echo "Please remove linuxwacom package if your system has an existing one" + echo "Removing Wacom X driver related utility programs...." rm -f /usr/local/bin/xsetwacom rm -f /usr/local/bin/wacdump @@ -14,12 +16,22 @@ rm -f /usr/local/bin/xidump rm -f /usr/bin/xsetwacom rm -f /usr/bin/wacdump rm -f /usr/bin/xidump +rm -f /usr/local/libexec/hal-setup-wacom +rm -f /usr/local/share/hal/fdi/policy/20thirdparty/10-linuxwacom.fdi rm -f /usr/local/lib/libwacomcfg.la /usr/local/lib/libwacomcfg.so.0.0.1 /usr/local/lib/libwacomcfg.so.0 /usr/local/lib/libwacomcf.so /usr/local/lib/libwacomcfg.a rm -f /usr/local/include/wacomcfg/wacomcfg.h rm -f /usr/local/bin/wacomcpl rm -f /usr/local/bin/wacomcpl-exec rm -f /usr/local/lib/TkXInput/pkgIndex.tcl rm -f /usr/local/lib/TkXInput/libwacomxi.la /usr/local/lib/TkXInput/libwacomxi.so.0.0.0 /usr/local/lib/TkXInput/libwacomxi.so.0 /usr/local/lib/TkXInput/libwacomxi.so /usr/local/lib/TkXInput/libwacomxi.a +rm -f /usr/libexec/hal-setup-wacom +rm -f /usr/share/hal/fdi/policy/20thirdparty/10-linuxwacom.fdi +rm -f /usr/lib/libwacomcfg.la /usr/lib/libwacomcfg.so.0.0.1 /usr/lib/libwacomcfg.so.0 /usr/lib/libwacomcf.so /usr/lib/libwacomcfg.a +rm -f /usr/include/wacomcfg/wacomcfg.h +rm -f /usr/bin/wacomcpl +rm -f /usr/bin/wacomcpl-exec +rm -f /usr/lib/TkXInput/pkgIndex.tcl +rm -f /usr/lib/TkXInput/libwacomxi.la /usr/lib/TkXInput/libwacomxi.so.0.0.0 /usr/lib/TkXInput/libwacomxi.so.0 /usr/lib/TkXInput/libwacomxi.so /usr/lib/TkXInput/libwacomxi.a rm -f /etc/wacom.dat rm -f /etc/X11/wcm.* echo "Wacom X driver related utility programs have been removed" diff --git a/src/util/Makefile.am b/src/util/Makefile.am index e8dbbc0..34e013b 100755 --- a/src/util/Makefile.am +++ b/src/util/Makefile.am @@ -5,11 +5,11 @@ wacomcfgdir = $(includedir)/wacomcfg wacomcfg_HEADERS = wacomcfg.h if WCM_ENV_XORGSDK -WACOMCFG_INCLUDES = -I$(WCM_XORGSDK_DIR) $(X_CFLAGS) +WACOMCFG_INCLUDES = -I$(WCM_XORGSDK_DIR) $(X_CFLAGS) $(HAL_CFLAGS) endif if WCM_ENV_XFREE86 -WACOMCFG_INCLUDES = -I$(WCM_XFREE86_DIR) $(HAL_CFLAGS) +WACOMCFG_INCLUDES = -I$(WCM_XFREE86_DIR) endif AM_CFLAGS = -Wall -pedantic $(WACOMCFG_INCLUDES) @@ -20,6 +20,8 @@ AM_CFLAGS = -Wall -pedantic $(WACOMCFG_INCLUDES) EXTRA_PROGRAMS = wacdump xidump xsetwacom if WCM_HAVE_HAL libexec_PROGRAMS = hal-setup-wacom +fdidir = $(prefix)/share/hal/fdi/policy/20thirdparty +fdi_SCRIPTS = 10-linuxwacom.fdi endif # Source dependencies diff --git a/src/util/xidump.c b/src/util/xidump.c index 319ce05..51314d5 100755 --- a/src/util/xidump.c +++ b/src/util/xidump.c @@ -561,7 +561,7 @@ static int CursesRun(Display* pDisp, XDeviceInfo* pDevInfo, FORMATTYPE fmt) ((pMove->axis_data[5]&0xffff0000)>>16); if ( v ) { - snprintf(chBuf,sizeof(chBuf), "%12d", v); + snprintf(chBuf,sizeof(chBuf), "%12u", v); wacscrn_output(nTitleRow,52,chBuf); } */ diff --git a/src/util/xsetwacom.c b/src/util/xsetwacom.c index cf478fb..ff26172 100755 --- a/src/util/xsetwacom.c +++ b/src/util/xsetwacom.c @@ -1056,6 +1056,8 @@ static void DisplayValue (WACOMDEVICE *hDev, const char *devname, PARAMINFO *p, snprintf (strval, sizeof (strval), "%s", option_char[value] ); } + else if (p->nParamID == XWACOM_PARAM_TOOLSERIAL) + snprintf (strval, sizeof (strval), "%u", value); else snprintf (strval, sizeof (strval), "%d", value); break; diff --git a/src/xdrv/wcmCommon.c b/src/xdrv/wcmCommon.c index 30de949..b031338 100755 --- a/src/xdrv/wcmCommon.c +++ b/src/xdrv/wcmCommon.c @@ -789,7 +789,7 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds) if (priv->serial && serial != priv->serial) { DBG(10, priv->debugLevel, ErrorF("[%s] serial number" - " is %d but your system configured %d", + " is %u but your system configured %u", local->name, serial, (int)priv->serial)); return; } @@ -812,13 +812,13 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds) tx, ty, wheel, rot, throttle)); /* rotation mixes x and y up a bit */ - if (common->wcmRotate == ROTATE_CCW) + if (common->wcmRotate == ROTATE_CW) { tmp_coord = x; x = y; y = priv->wcmMaxY - tmp_coord; } - else if (common->wcmRotate == ROTATE_CW) + else if (common->wcmRotate == ROTATE_CCW) { tmp_coord = y; y = x; @@ -844,7 +844,7 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds) DBG(6, priv->debugLevel, ErrorF("[%s] %s prox=%d\tx=%d" "\ty=%d\tz=%d\tv3=%d\tv4=%d\tv5=%d\tid=%d" - "\tserial=%d\tbutton=%s\tbuttons=%d\n", + "\tserial=%u\tbutton=%s\tbuttons=%d\n", local->name, is_absolute ? "abs" : "rel", is_proximity, @@ -1685,7 +1685,7 @@ static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel, else { DBG(11, common->debugLevel, ErrorF("no device matches with" - " id=%d, serial=%d\n", + " id=%d, serial=%u\n", ds->device_type, ds->serial_num)); } } @@ -1993,13 +1993,13 @@ static void rotateOneTool(WacomDevicePtr priv) } switch (common->wcmRotate) { - case ROTATE_CCW: + case ROTATE_CW: area->topX = priv->topX = tmpTopY; area->bottomX = priv->bottomX = tmpBottomY; area->topY = priv->topY = oldMaxX - tmpBottomX; area->bottomY = priv->bottomY =oldMaxX - tmpTopX; break; - case ROTATE_CW: + case ROTATE_CCW: area->topX = priv->topX = oldMaxY - tmpBottomY; area->bottomX = priv->bottomX = oldMaxY - tmpTopY; area->topY = priv->topY = tmpTopX; @@ -2068,13 +2068,13 @@ void xf86WcmRotateTablet(LocalDevicePtr local, int value) /* recover to the unrotated xy-rectangles */ switch (oldRotation) { - case ROTATE_CCW: + case ROTATE_CW: tmppriv->topX = oldMaxY - tmpBottomY; tmppriv->bottomX = oldMaxY - tmpTopY; tmppriv->topY = tmpTopX; tmppriv->bottomY = tmpBottomX; break; - case ROTATE_CW: + case ROTATE_CCW: tmppriv->topX = tmpTopY; tmppriv->bottomX = tmpBottomY; tmppriv->topY = oldMaxX - tmpBottomX; diff --git a/src/xdrv/wcmCompat.c b/src/xdrv/wcmCompat.c index dc3f1ce..f00af8f 100755 --- a/src/xdrv/wcmCompat.c +++ b/src/xdrv/wcmCompat.c @@ -32,10 +32,13 @@ int xf86WcmWait(int t) return err; } -int xf86WcmReady(int fd) +int xf86WcmReady(LocalDevicePtr local) { - int n = xf86WaitForInput(fd, 0); + WacomDevicePtr priv = (WacomDevicePtr)local->private; + int n = xf86WaitForInput(local->fd, 0); + DBG(10, priv->debugLevel, ErrorF("xf86WcmReady for %s with %d numbers of data\n", local->name, n)); + if (n >= 0) return n ? 1 : 0; - ErrorF("Wacom select error : %s\n", strerror(errno)); + ErrorF("Wacom select error : %s for %s \n", strerror(errno), local->name); return 0; } diff --git a/src/xdrv/wcmConfig.c b/src/xdrv/wcmConfig.c index 98dee3a..213d9b6 100755 --- a/src/xdrv/wcmConfig.c +++ b/src/xdrv/wcmConfig.c @@ -783,18 +783,18 @@ static LocalDevicePtr xf86WcmInit(InputDriverPtr drv, IDevPtr dev, int flags) common->wcmThreshold); priv->wcmMaxX = xf86SetIntOption(local->options, "MaxX", - priv->wcmMaxX); - if (priv->wcmMaxX != 0) - xf86Msg(X_CONFIG, "%s: max x = %d\n", dev->identifier, + common->wcmMaxX); + if (priv->wcmMaxX > 0) + xf86Msg(X_CONFIG, "%s: max x set to %d by xorg.conf\n", dev->identifier, priv->wcmMaxX); /* Update tablet logical max X */ if (!IsTouch(priv)) common->wcmMaxX = priv->wcmMaxX; priv->wcmMaxY = xf86SetIntOption(local->options, "MaxY", - priv->wcmMaxY); - if (priv->wcmMaxY != 0) - xf86Msg(X_CONFIG, "%s: max y = %d\n", dev->identifier, + common->wcmMaxY); + if (priv->wcmMaxY > 0) + xf86Msg(X_CONFIG, "%s: max y set to %d by xorg.conf\n", dev->identifier, priv->wcmMaxY); /* Update tablet logical max Y */ @@ -1009,10 +1009,10 @@ static XF86ModuleVersionInfo xf86WcmVersionRec = {0, 0, 0, 0} /* signature, to be patched into the file by a tool */ }; -#ifdef WCM_XFREE86 - XF86ModuleData wacomModuleData = -#else +#ifdef _X_EXPORT _X_EXPORT XF86ModuleData wacomModuleData = +#else + XF86ModuleData wacomModuleData = #endif { &xf86WcmVersionRec, diff --git a/src/xdrv/wcmUSB.c b/src/xdrv/wcmUSB.c index b75ce8a..16acd12 100755 --- a/src/xdrv/wcmUSB.c +++ b/src/xdrv/wcmUSB.c @@ -216,7 +216,7 @@ static void usbParseChannel(LocalDevicePtr local, int channel, int serial); static WacomModel usbCintiq = { - "USB Cintiq", + "USB PL/Cintiq", usbInitProtocol4, NULL, /* resolution not queried */ usbWcmGetRanges, @@ -576,6 +576,11 @@ Bool usbWcmInit(LocalDevicePtr local, char* id, float *version) } } } + else + { + ErrorF("%x is not supported by linuxwacom.\n", sID[1]); + return FALSE; + } if (!common->wcmModel) { @@ -917,8 +922,7 @@ static void usbParseEvent(LocalDevicePtr local, { if (!common->wcmChannel[i].work.proximity) { - memset(&common->wcmChannel[i],0, - sizeof(WacomChannel)); + memset(&common->wcmChannel[i],0,sizeof(WacomChannel)); /* in case the in-prox event was missing */ common->wcmChannel[i].work.proximity = 1; channel = i; @@ -931,15 +935,28 @@ static void usbParseEvent(LocalDevicePtr local, /* fresh out of channels */ if (channel < 0) { - /* this should never happen in normal use */ - ErrorF("usbParse: Exceeded channel count; " - "ignoring the events.\n"); - common->wcmEventCnt = 0; + /* This should never happen in normal use. + * So something was wrong. Let's start over again. + * Force prox-out for all channels. + */ + for (i=0; i<MAX_CHANNELS; ++i) + { + if (common->wcmChannel[i].work.proximity) + { + common->wcmChannel[i].work.proximity = 0; + /* dispatch event */ + xf86WcmEvent(common, i, &common->wcmChannel[i].work); + } + } + ErrorF("usbParse (%s with serial number: %u) at %d: Exceeded channel count; " + "ignoring the events.\n", local->name, common->wcmLastToolSerial, + (int)GetTimeInMillis()); return; } + else + usbParseChannel(local,channel,common->wcmLastToolSerial); - usbParseChannel(local,channel,common->wcmLastToolSerial); common->wcmLastToolSerial = 0; common->wcmEventCnt = 0; } diff --git a/src/xdrv/xf86Wacom.c b/src/xdrv/xf86Wacom.c index 05582f6..7609388 100755 --- a/src/xdrv/xf86Wacom.c +++ b/src/xdrv/xf86Wacom.c @@ -75,10 +75,11 @@ * 2008-08-27 47-pc0.8.1-4 - Support Bamboo1 Meadium and Monarch * 2008-11-11 47-pc0.8.2 - new release * 2008-12-22 47-pc0.8.2-1 - fixed a few issues - * 2009-02-20 47-pc0.8.3 - new release + * 2009-03-26 47-pc0.8.3 - Added Intuos4 support + * 2009-04-03 47-pc0.8.3-2 - HAL support */ -static const char identification[] = "$Identification: 47-0.8.3 $"; +static const char identification[] = "$Identification: 47-0.8.3-2 $"; /****************************************************************************/ @@ -301,7 +302,7 @@ void xf86WcmVirtaulTabletPadding(LocalDevicePtr local) if (!(priv->flags & ABSOLUTE_FLAG)) return; - if ((priv->screen_no != -1) || (priv->twinview != TV_NONE)) + if ((priv->screen_no != -1) || (priv->twinview != TV_NONE) || (!priv->wcmMMonitor)) { i = priv->currentScreen; @@ -338,7 +339,7 @@ void xf86WcmVirtaulTabletSize(LocalDevicePtr local) priv->sizeX = priv->bottomX - priv->topX - priv->tvoffsetX; priv->sizeY = priv->bottomY - priv->topY - priv->tvoffsetY; - if ((priv->screen_no != -1) || (priv->twinview != TV_NONE)) + if ((priv->screen_no != -1) || (priv->twinview != TV_NONE) || (!priv->wcmMMonitor)) { i = priv->currentScreen; @@ -952,11 +953,11 @@ static void xf86WcmDevReadInput(LocalDevicePtr local) /* move data until we exhaust the device */ for (loop=0; loop < MAX_READ_LOOPS; ++loop) { + /* verify that there is still data in pipe */ + if (!xf86WcmReady(local)) break; + /* dispatch */ common->wcmDevCls->Read(local); - - /* verify that there is still data in pipe */ - if (!xf86WcmReady(local->fd)) break; } /* report how well we're doing */ diff --git a/src/xdrv/xf86Wacom.h b/src/xdrv/xf86Wacom.h index 3b299bf..1e6bffd 100755 --- a/src/xdrv/xf86Wacom.h +++ b/src/xdrv/xf86Wacom.h @@ -191,7 +191,7 @@ struct _WacomModule #define RESET_RELATIVE(ds) do { (ds).relwheel = 0; } while (0) int xf86WcmWait(int t); -int xf86WcmReady(int fd); +int xf86WcmReady(LocalDevicePtr local); LocalDevicePtr xf86WcmAllocate(char* name, int flag); LocalDevicePtr xf86WcmAllocateStylus(void); |