diff options
author | pingc <pingc> | 2008-10-08 23:22:20 +0000 |
---|---|---|
committer | pingc <pingc> | 2008-10-08 23:22:20 +0000 |
commit | 9a414e1a3f095cfe5bc616c150241400d2dc7f51 (patch) | |
tree | 11da004e3dad78bd8a8195a66051d3cf784909fd | |
parent | be9b22da0e932e4c433e6bf23aa37e14ecc7c7dc (diff) | |
download | xf86-input-wacom-9a414e1a3f095cfe5bc616c150241400d2dc7f51.tar.gz |
Updated wacomcpl and its related utilitiesrelease-0.8.1-5
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | configure.in | 27 | ||||
-rwxr-xr-x | src/2.6.11/wacom_sys.c | 14 | ||||
-rwxr-xr-x | src/2.6.13/wacom_sys.c | 14 | ||||
-rwxr-xr-x | src/2.6.15/wacom_sys.c | 14 | ||||
-rw-r--r-- | src/2.6.16/wacom_sys.c | 14 | ||||
-rw-r--r-- | src/2.6.16/wacom_wac.c | 25 | ||||
-rwxr-xr-x | src/2.6.19/wacom_sys.c | 14 | ||||
-rwxr-xr-x | src/2.6.19/wacom_wac.c | 27 | ||||
-rwxr-xr-x | src/2.6.22/wacom_sys.c | 14 | ||||
-rwxr-xr-x | src/2.6.24/wacom_sys.c | 14 | ||||
-rwxr-xr-x | src/2.6.26/wacom_sys.c | 26 | ||||
-rwxr-xr-x | src/util/wacomcfg.c | 25 | ||||
-rwxr-xr-x | src/wacomxi/wacomcpl-exec | 45 | ||||
-rwxr-xr-x | src/xdrv/wcmCommon.c | 23 | ||||
-rwxr-xr-x | src/xdrv/wcmConfig.c | 2 | ||||
-rwxr-xr-x | src/xdrv/wcmISDV4.c | 108 | ||||
-rwxr-xr-x | src/xdrv/wcmSerial.c | 5 | ||||
-rwxr-xr-x | src/xdrv/wcmUSB.c | 2 | ||||
-rw-r--r-- | src/xdrv/wcmXCommand.c | 2 | ||||
-rwxr-xr-x | src/xdrv/xf86Wacom.c | 31 | ||||
-rwxr-xr-x | src/xdrv/xf86WacomDefs.h | 43 |
22 files changed, 303 insertions, 193 deletions
@@ -1,3 +1,10 @@ +2008-10-08 Ping Cheng <pingc@wacom.com> + * Updated configure.in for Xorg 1.5 + * USB Tablet PC 0x90, 0x93, 0x9A are supported + * Merged Danny's xf86Config patch + * Updated wacomcpl for touch w/o capacity + * Label 0.8.1-5 + 2008-09-01 Ping Cheng <pingc@wacom.com> * Support Xorg 7.3 or newer in wacomcpl * Modified wacom_sys.c according to Bartosz Fabianowski's suggestion diff --git a/configure.in b/configure.in index c1d3e29..af4fd58 100644 --- a/configure.in +++ b/configure.in @@ -351,11 +351,6 @@ if test "$WCM_ENV_XLIB" = yes; then CFLAGS="$CFLAGS -D__amd64__" WCM_XSERVER64="-D_XSERVER64" fi - AC_MSG_CHECKING(for lib xf86config) - if test -f $WCM_XLIB_DIR/libxf86config.a -o -f $WCM_XLIB_DIR/libxf86config.so; then - AC_MSG_RESULT([found, $WCM_XLIB_DIR]) - WCM_ENV_XF86CONFIG=yes - fi fi dnl ======================================================= @@ -490,8 +485,8 @@ if test "$WCM_ENV_XFREE86" != yes; then #include <xorgVersion.h> #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1, 4, 0, 0, 0) # error "X.org < 1.4 doesn't need rescaling code" -#elif XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1, 4, 99, 2, 0) -# error "X.org >= 1.4.99.2 doesn't need rescaling code" +#elif XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1, 4, 1, 0, 0) +# error "X.org >= 1.4.1 doesn't need rescaling code" #endif ], , [WCM_TABLET_SCALING=yes], [WCM_TABLET_SCALING=no]) CFLAGS="$save_CFLAGS" @@ -622,6 +617,22 @@ if test "$WCM_ENV_XFREE86" != yes; then fi AM_CONDITIONAL(WCM_ENV_XORGSDK, [test "$WCM_ENV_XORGSDK" = yes]) +AC_MSG_CHECKING(for lib xf86config) +if test -f $WCM_XLIB_DIR/libxf86config.a -o -f $WCM_XLIB_DIR/libxf86config.so; then + if test -f $WCM_XFREE86_DIR/$XFREE86SUBDIR/xf86Parser.h; then + AC_MSG_RESULT([found, $WCM_XFREE86_DIR/$XFREE86SUBDIR]) + WCM_ENV_XF86CONFIG=yes + CFLAGS="$CFLAGS -I$WCM_XFREE86_DIR/$XFREE86SUBDIR" + elif test -f $WCM_XORGSDK_DIR/xf86Parser.h; then + AC_MSG_RESULT([found, $WCM_XORGSDK_DIR]) + WCM_ENV_XF86CONFIG=yes + elif test -f $WCM_XLIB_DIR/../include/xf86Parser.h; then + AC_MSG_RESULT([found, $WCM_XLIB_DIR/../include]) + WCM_ENV_XF86CONFIG=yes + CFLAGS="$CFLAGS -I$WCM_XLIB_DIR/../include" + fi +fi + # Define X_CFLAGS, X_LIBS, X_EXTRA_LIBS and X_PRELIBS as required if X # is found, else defines X_DISPLAY_MISSING. We need at least X_CFLAGS. AC_PATH_XTRA @@ -1029,7 +1040,7 @@ echo " Xorg SDK - $WCM_ENV_XORGSDK $WCM_XORGSDK_DIR" echo " XSERVER64 - $WCM_OPTION_XSERVER64" echo " dlloader - $WCM_OPTION_DLLOADER" echo " XLib - $WCM_ENV_XLIB $WCM_XLIB_DIR" -echo " xf86config - $WCM_ENV_XF86CONFIG $WCM_XLIB_DIR" +echo " xf86config - $WCM_ENV_XF86CONFIG" echo " TCL - $WCM_ENV_TCL $WCM_TCL_DIR" echo " TK - $WCM_ENV_TK $WCM_TK_DIR" echo " ncurses - $WCM_ENV_NCURSES" diff --git a/src/2.6.11/wacom_sys.c b/src/2.6.11/wacom_sys.c index 71b8718..93b87f7 100755 --- a/src/2.6.11/wacom_sys.c +++ b/src/2.6.11/wacom_sys.c @@ -17,6 +17,7 @@ /* defines to get HID report descriptor */ #define HID_DEVICET_HID (USB_TYPE_CLASS | 0x01) #define HID_DEVICET_REPORT (USB_TYPE_CLASS | 0x02) +#define HID_USAGE_UNDEFINED 0x00 #define HID_USAGE_PAGE 0x05 #define HID_USAGE_PAGE_DIGITIZER 0x0d #define HID_USAGE_PAGE_DESKTOP 0x01 @@ -284,12 +285,6 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h usage = WCM_DESKTOP; i++; continue; - case HID_USAGE_PAGE_VDEFINED: - if (!report[i+3]) { /* capacity */ - wacom_wac->features->pressure_max = (unsigned short)report[i+5]; - } - i += 6; - continue; } } @@ -333,6 +328,13 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h pen = 1; i++; break; + case HID_USAGE_UNDEFINED: + if (usage == WCM_DESKTOP && finger) { /* capacity */ + wacom_wac->features->pressure_max = (unsigned short) + (wacom_le16_to_cpu(&report[i+3])); + } + i += 4; + break; } } diff --git a/src/2.6.13/wacom_sys.c b/src/2.6.13/wacom_sys.c index 488400b..591c547 100755 --- a/src/2.6.13/wacom_sys.c +++ b/src/2.6.13/wacom_sys.c @@ -17,6 +17,7 @@ /* defines to get HID report descriptor */ #define HID_DEVICET_HID (USB_TYPE_CLASS | 0x01) #define HID_DEVICET_REPORT (USB_TYPE_CLASS | 0x02) +#define HID_USAGE_UNDEFINED 0x00 #define HID_USAGE_PAGE 0x05 #define HID_USAGE_PAGE_DIGITIZER 0x0d #define HID_USAGE_PAGE_DESKTOP 0x01 @@ -283,12 +284,6 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h usage = WCM_DESKTOP; i++; continue; - case HID_USAGE_PAGE_VDEFINED: - if (!report[i+3]) { /* capacity */ - wacom_wac->features->pressure_max = (unsigned short)report[i+5]; - } - i += 6; - continue; } } @@ -332,6 +327,13 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h pen = 1; i++; break; + case HID_USAGE_UNDEFINED: + if (usage == WCM_DESKTOP && finger) { /* capacity */ + wacom_wac->features->pressure_max = (unsigned short) + (wacom_le16_to_cpu(&report[i+3])); + } + i += 4; + break; } } diff --git a/src/2.6.15/wacom_sys.c b/src/2.6.15/wacom_sys.c index ad7b31d..3f90f16 100755 --- a/src/2.6.15/wacom_sys.c +++ b/src/2.6.15/wacom_sys.c @@ -17,6 +17,7 @@ /* defines to get HID report descriptor */ #define HID_DEVICET_HID (USB_TYPE_CLASS | 0x01) #define HID_DEVICET_REPORT (USB_TYPE_CLASS | 0x02) +#define HID_USAGE_UNDEFINED 0x00 #define HID_USAGE_PAGE 0x05 #define HID_USAGE_PAGE_DIGITIZER 0x0d #define HID_USAGE_PAGE_DESKTOP 0x01 @@ -278,12 +279,6 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h usage = WCM_DESKTOP; i++; continue; - case HID_USAGE_PAGE_VDEFINED: - if (!report[i+3]) { /* capacity */ - wacom_wac->features->pressure_max = (unsigned short)report[i+5]; - } - i += 6; - continue; } } @@ -327,6 +322,13 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h pen = 1; i++; break; + case HID_USAGE_UNDEFINED: + if (usage == WCM_DESKTOP && finger) { /* capacity */ + wacom_wac->features->pressure_max = (unsigned short) + (wacom_le16_to_cpu(&report[i+3])); + } + i += 4; + break; } } diff --git a/src/2.6.16/wacom_sys.c b/src/2.6.16/wacom_sys.c index 11f64ac..1af065b 100644 --- a/src/2.6.16/wacom_sys.c +++ b/src/2.6.16/wacom_sys.c @@ -17,6 +17,7 @@ /* defines to get HID report descriptor */ #define HID_DEVICET_HID (USB_TYPE_CLASS | 0x01) #define HID_DEVICET_REPORT (USB_TYPE_CLASS | 0x02) +#define HID_USAGE_UNDEFINED 0x00 #define HID_USAGE_PAGE 0x05 #define HID_USAGE_PAGE_DIGITIZER 0x0d #define HID_USAGE_PAGE_DESKTOP 0x01 @@ -278,12 +279,6 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h usage = WCM_DESKTOP; i++; continue; - case HID_USAGE_PAGE_VDEFINED: - if (!report[i+3]) { /* capacity */ - wacom_wac->features->pressure_max = (unsigned short)report[i+5]; - } - i += 6; - continue; } } @@ -327,6 +322,13 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h pen = 1; i++; break; + case HID_USAGE_UNDEFINED: + if (usage == WCM_DESKTOP && finger) { /* capacity */ + wacom_wac->features->pressure_max = (unsigned short) + (wacom_le16_to_cpu(&report[i+3])); + } + i += 4; + break; } } diff --git a/src/2.6.16/wacom_wac.c b/src/2.6.16/wacom_wac.c index b36e18d..06f2812 100644 --- a/src/2.6.16/wacom_wac.c +++ b/src/2.6.16/wacom_wac.c @@ -537,21 +537,33 @@ int wacom_tpc_irq (struct wacom_wac *wacom, void *wcombo) { static int stylusInProx, touchInProx; char *data = wacom->data; - int prox = data[1] & 0x20, pressure; + int prox = 0, pressure; struct urb *urb = ((struct wacom_combo *)wcombo)->urb; - if (urb->actual_length == 5 || data[0] == 6) { /* Touch data */ + if (urb->actual_length == 5 || data[0] == 6) { /* Touch data */ + if (urb->actual_length == 5) { /* with touch */ + prox = data[0] & 0x03; + } else { /* with capacity */ + prox = data[1] & 0x03; + } + if (stylusInProx) { /* stylus is still in prox */ touchInProx = 1; } else { - if (data[0] & 0x03) { + if (prox) { if (!touchInProx) { wacom->tool[1] = BTN_TOUCH; wacom->id[0] = TOUCH_DEVICE_ID; - wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1])); - wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[3])); + if (urb->actual_length != 5) { + wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[2])); + wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[4])); + wacom_report_abs(wcombo, ABS_PRESSURE, wacom_le16_to_cpu(&data[6])); + } else { + wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1])); + wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[3])); + } wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); - wacom_report_key(wcombo, wacom->tool[1], data[0] & 0x01); + wacom_report_key(wcombo, wacom->tool[1], prox & 0x01); return 1; } } else { @@ -562,6 +574,7 @@ int wacom_tpc_irq (struct wacom_wac *wacom, void *wcombo) } } } else if (data[0] == 2) { /* Penabled */ + prox = data[1] & 0x20; /* touch was in control */ if (wacom->id[0] == TOUCH_DEVICE_ID) { /* let it go */ diff --git a/src/2.6.19/wacom_sys.c b/src/2.6.19/wacom_sys.c index 6ece78a..9a01aed 100755 --- a/src/2.6.19/wacom_sys.c +++ b/src/2.6.19/wacom_sys.c @@ -17,6 +17,7 @@ /* defines to get HID report descriptor */ #define HID_DEVICET_HID (USB_TYPE_CLASS | 0x01) #define HID_DEVICET_REPORT (USB_TYPE_CLASS | 0x02) +#define HID_USAGE_UNDEFINED 0x00 #define HID_USAGE_PAGE 0x05 #define HID_USAGE_PAGE_DIGITIZER 0x0d #define HID_USAGE_PAGE_DESKTOP 0x01 @@ -271,12 +272,6 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h usage = WCM_DESKTOP; i++; continue; - case HID_USAGE_PAGE_VDEFINED: - if (!report[i+3]) { /* capacity */ - wacom_wac->features->pressure_max = (unsigned short)report[i+5]; - } - i += 6; - continue; } } @@ -320,6 +315,13 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h pen = 1; i++; break; + case HID_USAGE_UNDEFINED: + if (usage == WCM_DESKTOP && finger) { /* capacity */ + wacom_wac->features->pressure_max = (unsigned short) + (wacom_le16_to_cpu(&report[i+3])); + } + i += 4; + break; } } diff --git a/src/2.6.19/wacom_wac.c b/src/2.6.19/wacom_wac.c index d59901e..3fdccb7 100755 --- a/src/2.6.19/wacom_wac.c +++ b/src/2.6.19/wacom_wac.c @@ -528,34 +528,47 @@ static int wacom_intuos_irq(struct wacom_wac *wacom, void *wcombo) int wacom_tpc_irq(struct wacom_wac *wacom, void *wcombo) { char *data = wacom->data; - int prox = data[1] & 0x20, pressure; + int prox = 0, pressure; static int stylusInProx, touchInProx; struct urb *urb = ((struct wacom_combo *)wcombo)->urb; dbg("wacom_tpc_irq: received report #%d", data[0]); - if (urb->actual_length == 5 || data[0] == 6) { /* Touch data */ + if (urb->actual_length == 5 || data[0] == 6) { /* Touch data */ + if (urb->actual_length == 5) { /* with touch */ + prox = data[0] & 0x03; + } else { /* with capacity */ + prox = data[1] & 0x03; + } + if (stylusInProx) { /* stylus still in prox */ touchInProx = 1; } else { - if (data[0] & 0x03) { + if (prox) { if (!touchInProx) { wacom->tool[1] = BTN_TOUCH; wacom->id[0] = TOUCH_DEVICE_ID; - wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1])); - wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[3])); + if (urb->actual_length != 5) { + wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[2])); + wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[4])); + wacom_report_abs(wcombo, ABS_PRESSURE, wacom_le16_to_cpu(&data[6])); + } else { + wacom_report_abs(wcombo, ABS_X, wacom_le16_to_cpu(&data[1])); + wacom_report_abs(wcombo, ABS_Y, wacom_le16_to_cpu(&data[3])); + } wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); - wacom_report_key(wcombo, wacom->tool[1], data[0] & 0x01); + wacom_report_key(wcombo, wacom->tool[1], prox & 0x01); return 1; } } else { touchInProx = 0; wacom_report_abs(wcombo, ABS_MISC, wacom->id[0]); - wacom_report_key(wcombo, wacom->tool[1], data[0] & 0x01); + wacom_report_key(wcombo, wacom->tool[1], prox & 0x01); return 1; } } } else if (data[0] == 2) { /* Penabled */ + prox = data[1] & 0x20; /* touch was in control */ if (wacom->id[0] == TOUCH_DEVICE_ID) { /* let it go */ diff --git a/src/2.6.22/wacom_sys.c b/src/2.6.22/wacom_sys.c index 0509116..46cbb7e 100755 --- a/src/2.6.22/wacom_sys.c +++ b/src/2.6.22/wacom_sys.c @@ -17,6 +17,7 @@ /* defines to get HID report descriptor */ #define HID_DEVICET_HID (USB_TYPE_CLASS | 0x01) #define HID_DEVICET_REPORT (USB_TYPE_CLASS | 0x02) +#define HID_USAGE_UNDEFINED 0x00 #define HID_USAGE_PAGE 0x05 #define HID_USAGE_PAGE_DIGITIZER 0x0d #define HID_USAGE_PAGE_DESKTOP 0x01 @@ -272,12 +273,6 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h usage = WCM_DESKTOP; i++; continue; - case HID_USAGE_PAGE_VDEFINED: - if (!report[i+3]) { /* capacity */ - wacom_wac->features->pressure_max = (unsigned short)report[i+5]; - } - i += 6; - continue; } } @@ -321,6 +316,13 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h pen = 1; i++; break; + case HID_USAGE_UNDEFINED: + if (usage == WCM_DESKTOP && finger) { /* capacity */ + wacom_wac->features->pressure_max = (unsigned short) + (wacom_le16_to_cpu(&report[i+3])); + } + i += 4; + break; } } diff --git a/src/2.6.24/wacom_sys.c b/src/2.6.24/wacom_sys.c index e8b4e6c..0de3041 100755 --- a/src/2.6.24/wacom_sys.c +++ b/src/2.6.24/wacom_sys.c @@ -17,6 +17,7 @@ /* defines to get HID report descriptor */ #define HID_DEVICET_HID (USB_TYPE_CLASS | 0x01) #define HID_DEVICET_REPORT (USB_TYPE_CLASS | 0x02) +#define HID_USAGE_UNDEFINED 0x00 #define HID_USAGE_PAGE 0x05 #define HID_USAGE_PAGE_DIGITIZER 0x0d #define HID_USAGE_PAGE_DESKTOP 0x01 @@ -283,12 +284,6 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h usage = WCM_DESKTOP; i++; continue; - case HID_USAGE_PAGE_VDEFINED: - if (!report[i+3]) { /* capacity */ - wacom_wac->features->pressure_max = (unsigned short)report[i+5]; - } - i += 6; - continue; } } @@ -332,6 +327,13 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h pen = 1; i++; break; + case HID_USAGE_UNDEFINED: + if (usage == WCM_DESKTOP && finger) { /* capacity */ + wacom_wac->features->pressure_max = (unsigned short) + (wacom_le16_to_cpu(&report[i+3])); + } + i += 4; + break; } } diff --git a/src/2.6.26/wacom_sys.c b/src/2.6.26/wacom_sys.c index d73b0b8..9ba72b2 100755 --- a/src/2.6.26/wacom_sys.c +++ b/src/2.6.26/wacom_sys.c @@ -17,6 +17,7 @@ /* defines to get HID report descriptor */ #define HID_DEVICET_HID (USB_TYPE_CLASS | 0x01) #define HID_DEVICET_REPORT (USB_TYPE_CLASS | 0x02) +#define HID_USAGE_UNDEFINED 0x00 #define HID_USAGE_PAGE 0x05 #define HID_USAGE_PAGE_DIGITIZER 0x0d #define HID_USAGE_PAGE_DESKTOP 0x01 @@ -271,7 +272,7 @@ void input_dev_pt(struct input_dev *input_dev, struct wacom_wac *wacom_wac) input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_RUBBER); } -static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc, +static void wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc, struct wacom_wac *wacom_wac, char *report) { struct usb_device *dev = interface_to_usbdev(intf); @@ -301,12 +302,6 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h usage = WCM_DESKTOP; i++; continue; - case HID_USAGE_PAGE_VDEFINED: - if (!report[i+3]) { /* capacity */ - wacom_wac->features->pressure_max = (unsigned short)report[i+5]; - } - i += 6; - continue; } } @@ -350,6 +345,13 @@ static void wacom_paser_hid(struct usb_interface *intf, struct hid_descriptor *h pen = 1; i++; break; + case HID_USAGE_UNDEFINED: + if (usage == WCM_DESKTOP && finger) { /* capacity */ + wacom_wac->features->pressure_max = (unsigned short) + (wacom_le16_to_cpu(&report[i+3])); + } + i += 4; + break; } } @@ -369,7 +371,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i struct wacom_wac *wacom_wac; struct input_dev *input_dev; int error = -ENOMEM; - char rep_data[2], limit = 0, mode = 2, *report = NULL; + char rep_data[2], limit = 0, *report = NULL; struct hid_descriptor *hid_desc; wacom = kzalloc(sizeof(struct wacom), GFP_KERNEL); @@ -422,7 +424,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i if (!report) { goto fail2; } - wacom_paser_hid(intf, hid_desc, wacom_wac, report); + wacom_parse_hid(intf, hid_desc, wacom_wac, report); } input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); @@ -456,11 +458,11 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i if (wacom_wac->features->type != TABLETPC) { do { rep_data[0] = 2; - rep_data[1] = mode; - error = error = usb_set_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); + rep_data[1] = 2; + error = usb_set_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); if(error >= 0) error = usb_get_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); - } while (((error <= 0) || (rep_data[1] != mode)) && limit++ < 5); + } while (((error <= 0) || (rep_data[1] != 2)) && limit++ < 5); } usb_set_intfdata(intf, wacom); diff --git a/src/util/wacomcfg.c b/src/util/wacomcfg.c index e2c1a35..39e1de2 100755 --- a/src/util/wacomcfg.c +++ b/src/util/wacomcfg.c @@ -46,11 +46,11 @@ #include <memory.h> #include <assert.h> +WACOMDEVICETYPE mapStringToType (const char*); #if WCM_XF86CONFIG #include "xf86Parser.h" WACOMDEVICETYPE checkIfWacomDevice (XF86ConfigPtr, const char*); - WACOMDEVICETYPE mapStringToType (const char*); XF86ConfigPtr readConfig (char *); void VErrorF(const char*, va_list); void ErrorF (const char*, ...); @@ -200,28 +200,14 @@ int WacomConfigListDevices(WACOMCONFIG *hConfig, WACOMDEVICEINFO** ppInfo, devName[j] = tolower(pInfo->pszName[j]); devName[j] = '\0'; -#if WCM_XF86CONFIG pInfo->type = mapStringToType (devName); +#if WCM_XF86CONFIG if ( pInfo->type == WACOMDEVICETYPE_UNKNOWN ) pInfo->type = checkIfWacomDevice (conf, pInfo->pszName); - else -#else - if (strstr(devName,"cursor") != NULL) - pInfo->type = WACOMDEVICETYPE_CURSOR; - else if (strstr(devName,"stylus") != NULL) - pInfo->type = WACOMDEVICETYPE_STYLUS; - else if (strstr(devName,"eraser") != NULL) - pInfo->type = WACOMDEVICETYPE_ERASER; - else if (strstr(devName,"touch") != NULL) - pInfo->type = WACOMDEVICETYPE_TOUCH; - else if (strstr(devName,"pad") != NULL) - pInfo->type = WACOMDEVICETYPE_PAD; - else - pInfo->type = WACOMDEVICETYPE_UNKNOWN; +#endif if ( pInfo->type != WACOMDEVICETYPE_UNKNOWN ) -#endif { ++pInfo; ++nCount; @@ -270,12 +256,16 @@ WACOMDEVICETYPE checkIfWacomDevice (XF86ConfigPtr conf, const char* pszDeviceNam return WACOMDEVICETYPE_UNKNOWN; } +#endif WACOMDEVICETYPE mapStringToType (const char* name) { if (!name) return WACOMDEVICETYPE_UNKNOWN; + /* No spaces are allowed in Wacom device identifiers */ + if (strstr(name," ") != NULL) + return WACOMDEVICETYPE_UNKNOWN; if (strstr(name,"cursor") != NULL) return WACOMDEVICETYPE_CURSOR; else if (strstr(name,"stylus") != NULL) @@ -290,7 +280,6 @@ WACOMDEVICETYPE mapStringToType (const char* name) return WACOMDEVICETYPE_UNKNOWN; } -#endif WACOMDEVICE * WacomConfigOpenDevice(WACOMCONFIG * hConfig, const char* pszDeviceName) diff --git a/src/wacomxi/wacomcpl-exec b/src/wacomxi/wacomcpl-exec index b4e0ea8..eb6f201 100755 --- a/src/wacomxi/wacomcpl-exec +++ b/src/wacomxi/wacomcpl-exec @@ -462,6 +462,7 @@ proc updateDevice {} { } } elseif { $isLCD($model) } { if { ![ string compare $type "stylus" ] } { + createPanel 1 1 0 1 } elseif { [ string compare $type "cursor" ] } { createPanel 1 1 0 0 @@ -1506,13 +1507,7 @@ proc touchState { theCButton } { set touchButton 1 } checkbutton $theCButton -text "Disable Touch" -anchor w \ - -variable touchButton -state normal -command switchTouch - - if { $touchButton == 0 } { - .panel.calibrate configure -state normal - } else { - .panel.calibrate configure -state disable - } + -variable touchButton -state normal -command "switchTouch 0" } proc initialTouch {} { @@ -1521,8 +1516,9 @@ proc initialTouch {} { set model $getDeviceModel($device,model) set Option(1) "Capacity" + set Option(2) "touch" - getDeviceOptionProc $device 1 + getDeviceOptionProc $device 2 touchState $currentW.f.touch grid $currentW.f.touch -row 0 -column 2 @@ -1557,19 +1553,36 @@ proc updateTouch {} { set getOption($device,Capacity) $value } + switchTouch 1 + closeSubWindow } proc defaultTouch {} { global touchButton currentW getOptionDefault device - set touchButton $getOptionDefault($device,touch) + if { [ exec xsetwacom get $device touch ] != $getOptionDefault($device,touch) } { + set touchButton [ exec xsetwacom get $device touch ] + if { [ exec xsetwacom getdefault $device capacity ] < 0 } { + if { $touchButton == 0 } { + .panel.calibrate configure -state normal + } else { + .panel.calibrate configure -state disabled + } + } + } + $currentW.f.group.scale set $getOptionDefault($device,Capacity) } -proc switchTouch {} { +proc switchTouch { window } { global device touchButton + # don't send the command for touch with capacity + if { [ exec xsetwacom getdefault $device capacity ] >= 0 && $window == 0 } { + return + } + if { $touchButton == [ exec xsetwacom get $device touch ] } { if { $touchButton == 0 } { .panel.calibrate configure -state normal @@ -1580,7 +1593,7 @@ proc switchTouch {} { exec xsetwacom set $device touch 0 updateXinitrc $device touch 0 } - } + } } proc createPanel { pressure button mapping calibrate } { @@ -1620,6 +1633,11 @@ proc createPanel { pressure button mapping calibrate } { button .panel.pressure -text $wName(1) \ -state normal -command "displaySubWindow \ updateTouch defaultTouch initialTouch 1 0 0" + if { [ exec xsetwacom get $device touch ] == 1 } { + .panel.calibrate configure -state normal + } else { + .panel.calibrate configure -state disable + } } else { touchState .panel.pressure } @@ -1695,6 +1713,9 @@ proc updateModelInfo { } { #Capacitive TabletPC set hasCapacity(154) 1 + set hasCapacity(159) 1 + set isLCD(154) 1 + set isLCD(159) 1 #Cintiq for { set i 192 } { $i <= 199 } { incr i 1 } { @@ -1746,7 +1767,7 @@ proc updateModelInfo { } { } for { set i 0 } { $i <= 198 } { incr i 1 } { - if { $i == 147 } { + if { $i == 147 || $i == 154 || $i == 159 } { set hasTouch($i) 1 } } diff --git a/src/xdrv/wcmCommon.c b/src/xdrv/wcmCommon.c index 0b9873f..4fe24ae 100755 --- a/src/xdrv/wcmCommon.c +++ b/src/xdrv/wcmCommon.c @@ -1510,7 +1510,7 @@ static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel, /* touch capacity is supported */ if (IsTouch(priv) && common->wcmCapacityDefault >= 0) { - if ((int)((filtered.capacity * 5) / common->wcmMaxZ) > common->wcmCapacity) + if (((double)(filtered.capacity * 5) / (double)common->wcmMaxZ) > (5 - common->wcmCapacity)) filtered.buttons |= button; } @@ -1850,6 +1850,8 @@ void xf86WcmInitialScreens(LocalDevicePtr local) WacomDevicePtr priv = (WacomDevicePtr)local->private; int i; + DBG(2, priv->debugLevel, ErrorF("xf86WcmInitialScreens for \"%s\" " + "number of screen=%d \n", local->name, screenInfo.numScreens)); priv->tvoffsetX = 0; priv->tvoffsetY = 0; if (priv->twinview != TV_NONE) @@ -1867,14 +1869,17 @@ void xf86WcmInitialScreens(LocalDevicePtr local) for (i=0; i<screenInfo.numScreens; i++) { #ifdef WCM_HAVE_DIXSCREENORIGINS - priv->screenTopX[i] = dixScreenOrigins[i].x; - priv->screenTopY[i] = dixScreenOrigins[i].y; - priv->screenBottomX[i] = dixScreenOrigins[i].x; - priv->screenBottomY[i] = dixScreenOrigins[i].y; - - DBG(10, priv->debugLevel, ErrorF("xf86WcmInitialScreens from dix for \"%s\" " - "ScreenOrigins[%d].x=%d ScreenOrigins[%d].y=%d \n", - local->name, i, priv->screenTopX[i], i, priv->screenTopY[i])); + if (screenInfo.numScreens > 1) + { + priv->screenTopX[i] = dixScreenOrigins[i].x; + priv->screenTopY[i] = dixScreenOrigins[i].y; + priv->screenBottomX[i] = dixScreenOrigins[i].x; + priv->screenBottomY[i] = dixScreenOrigins[i].y; + + DBG(10, priv->debugLevel, ErrorF("xf86WcmInitialScreens from dix for \"%s\" " + "ScreenOrigins[%d].x=%d ScreenOrigins[%d].y=%d \n", + local->name, i, priv->screenTopX[i], i, priv->screenTopY[i])); + } #else /* WCM_HAVE_DIXSCREENORIGINS */ if (i > 0) { diff --git a/src/xdrv/wcmConfig.c b/src/xdrv/wcmConfig.c index 4925698..ad5d648 100755 --- a/src/xdrv/wcmConfig.c +++ b/src/xdrv/wcmConfig.c @@ -378,7 +378,7 @@ static void xf86WcmUninit(InputDriverPtr drv, LocalDevicePtr local, int flags) DBG(1, priv->debugLevel, ErrorF("xf86WcmUninit\n")); -#ifndef WCM_UNINIT_CALLED +#ifndef WCM_XORG_XSERVER_1_4 gWacomModule.DevProc(local->dev, DEVICE_OFF); #endif diff --git a/src/xdrv/wcmISDV4.c b/src/xdrv/wcmISDV4.c index 779cdf2..b55025a 100755 --- a/src/xdrv/wcmISDV4.c +++ b/src/xdrv/wcmISDV4.c @@ -150,8 +150,13 @@ static int isdv4Query(LocalDevicePtr local, const char* query, char* data) } else { - ErrorF("Wacom ISDV4 control data (%x) error in %s query\n", data[0], query); - return !Success; + /* Reread the control data since with some vendors it fails the first time */ + xf86WcmWaitForTablet(local->fd, data, 11); + if ( !(data[0] & 0x40) ) + { + ErrorF("Wacom ISDV4 control data (%x) error in %s query\n", data[0], query); + return !Success; + } } } @@ -194,6 +199,7 @@ static int isdv4GetRanges(LocalDevicePtr local) char data[BUFFER_SIZE]; WacomDevicePtr priv = (WacomDevicePtr)local->private; WacomCommonPtr common = priv->common; + char * s; DBG(2, priv->debugLevel, ErrorF("getting ISDV4 Ranges\n")); @@ -201,8 +207,7 @@ static int isdv4GetRanges(LocalDevicePtr local) if (isdv4Query(local, WC_ISDV4_QUERY, data) == Success) { /* transducer data */ - common->wcmMaxZ = ( data[5] | - ((data[6] & 0x07) << 7) ); + common->wcmMaxZ = ( data[5] | ((data[6] & 0x07) << 7) ); common->wcmMaxX = ( (data[1] << 9) | (data[2] << 2) | ( (data[6] & 0x60) >> 5) ); common->wcmMaxY = ( (data[3] << 9) | (data[4] << 2 ) @@ -221,13 +226,19 @@ static int isdv4GetRanges(LocalDevicePtr local) if (common->wcmISDV4Speed != 19200) { + /* default to 0x93 (resistive touch) */ + common->wcmPktLength = 5; + common->tablet_id = 0x93; + + s = xf86FindOptionValue(local->options, "Touch"); + if ( !s || (strstr(s, "on")) ) /* touch option is on */ + { + common->wcmTouch = 1; + } + /* Touch might be supported. Send a touch query command */ if (isdv4Query(local, WC_ISDV4_TOUCH_QUERY, data) == Success) { - /* default to 0x93 (resisitive touch) */ - common->wcmPktLength = 5; - common->tablet_id = 0x93; - if (data[0] & 0x41) { /* tablet model */ @@ -244,14 +255,24 @@ static int isdv4GetRanges(LocalDevicePtr local) break; } - /* touch logical size */ - common->wcmMaxTouchX = common->wcmMaxTouchY = (int)data[1]; + /* touch logical size for tablet PC with touch */ + if (data[1]) + { + common->wcmMaxTouchX = common->wcmMaxTouchY = (int)(1 << data[1]); + } /* Max capacity */ - common->wcmMaxCapacity = (int)data[7]; + common->wcmMaxCapacity = (int)(1 << data[7]); if (common->wcmMaxCapacity) + { common->wcmCapacityDefault = 3; + common->wcmCapacity = 3; + common->wcmTouchResolX = common->wcmMaxTouchX / ( 2540 * + ((data[3] << 9) | (data[4] << 2) | ((data[2] & 0x60) >> 5))); + common->wcmTouchResolX = common->wcmMaxTouchX / ( 2540 * + ((data[5] << 9) | (data[6] << 2) | ((data[2] & 0x18) >> 3))); + } else { common->wcmCapacityDefault = -1; @@ -260,30 +281,28 @@ static int isdv4GetRanges(LocalDevicePtr local) } } - if (common->wcmMaxX && common->wcmMaxY && common->wcmMaxTouchX) + /* TouchDefault was off for all devices + * defaults to enable when touch is supported + */ + if (common->wcmTouch) { - char *s = xf86FindOptionValue(local->options, "Touch"); - if ( !s || (strstr(s, "on")) ) /* touch option is on */ - { - common->wcmTouch = 1; - } - - /* TouchDefault was off for all devices */ - /* defaults to enable when touch is supported */ common->wcmTouchDefault = 1; + } - /* Touch resolution */ - common->wcmTouchResolX = common->wcmMaxTouchX * - common->wcmResolX / common->wcmMaxX; - common->wcmTouchResolY = common->wcmMaxTouchY * - common->wcmResolY / common->wcmMaxY; + 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); } } DBG(2, priv->debugLevel, ErrorF("isdv4GetRanges speed=%d maxX=%d maxY=%d " - "maxZ=%d resX=%d resY=%d \n", common->wcmISDV4Speed, + "maxZ=%d TouchresX=%d TouchresY=%d \n", common->wcmISDV4Speed, common->wcmMaxX, common->wcmMaxY, common->wcmMaxZ, - common->wcmResolX, common->wcmResolY)); + common->wcmTouchResolX, common->wcmTouchResolY)); return Success; } @@ -303,17 +322,6 @@ static int isdv4StartTablet(LocalDevicePtr local) return Success; } -void setPktLenght(LocalDevicePtr local) -{ - WacomCommonPtr common = ((WacomDevicePtr)local->private)->common; - - if (common->wcmMaxCapacity) - common->wcmPktLength = 7; - else - common->wcmPktLength = 5; - return; -} - static int isdv4Parse(LocalDevicePtr local, const unsigned char* data) { WacomDevicePtr priv = (WacomDevicePtr)local->private; @@ -328,7 +336,7 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned char* data) /* determine the type of message (touch or stylus)*/ if (data[0] & 0x18) /* not a pen */ { - if ((common->wcmPktLength == 9 && last->proximity ) || + if ((last->device_id != TOUCH_DEVICE_ID && last->device_id && last->proximity ) || !common->wcmTouch ) { if ((data[0] & 0x10) && (!(data[0] & 0x01))) /* a touch out-prox data */ @@ -337,7 +345,6 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned char* data) touchInProx = 1; /* ignore touch event */ - setPktLenght(local); return common->wcmPktLength; } else @@ -346,25 +353,21 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned char* data) { if (!touchInProx) { - setPktLenght(local); channel = 1; } else if (!(data[0] & 0x01)) /* touch out-prox */ { touchInProx = 0; - setPktLenght(local); channel = 1; } else { - setPktLenght(local); /* ignore touch event */ return common->wcmPktLength; } } else { - setPktLenght(local); /* ignore touch event */ return common->wcmPktLength; } @@ -381,11 +384,8 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned char* data) xf86WcmEvent(common, 1, &out); return 0; } - else - { - common->wcmPktLength = 9; - channel = 0; - } + common->wcmPktLength = 9; + channel = 0; } if (common->buffer + common->bufpos - data < common->wcmPktLength) @@ -407,11 +407,17 @@ static int isdv4Parse(LocalDevicePtr local, const unsigned char* data) ds = &common->wcmChannel[channel].work; RESET_RELATIVE(*ds); - if (common->wcmPktLength == 5 ) /* a touch */ + if (common->wcmPktLength == 5 || common->wcmPktLength == 7) /* a touch */ { - /* MultiTouch input only has 5 bytes of data */ + /* touch without capacity has 5 bytes of data + * touch with capacity has 7 bytes of data + */ ds->x = (((int)data[1]) << 7) | ((int)data[2]); ds->y = (((int)data[3]) << 7) | ((int)data[4]); + if (common->wcmPktLength == 7) + { + ds->capacity = (((int)data[5]) << 7) | ((int)data[6]); + } ds->buttons = ds->proximity = data[0] & 0x01; ds->device_type = TOUCH_ID; ds->device_id = TOUCH_DEVICE_ID; diff --git a/src/xdrv/wcmSerial.c b/src/xdrv/wcmSerial.c index 14bc280..0307614 100755 --- a/src/xdrv/wcmSerial.c +++ b/src/xdrv/wcmSerial.c @@ -1308,10 +1308,11 @@ int xf86WcmSerialValidate(WacomCommonPtr common, const unsigned char* data) ((i!=0) && (data[i] & HEADER_BIT)) ) { bad = 1; - if (i!=1) + if (i!=0 && (data[i] & HEADER_BIT)) { ErrorF("xf86WcmSerialValidate: bad magic at %d " "v=%x l=%d\n", i, data[i], common->wcmPktLength); - if (i!=0 && (data[i] & HEADER_BIT)) return i; + return i; + } } } if (bad) return common->wcmPktLength; diff --git a/src/xdrv/wcmUSB.c b/src/xdrv/wcmUSB.c index 3e86298..1a6b656 100755 --- a/src/xdrv/wcmUSB.c +++ b/src/xdrv/wcmUSB.c @@ -515,7 +515,7 @@ Bool usbWcmInit(LocalDevicePtr local, char* id, float *version) /* initialize capacity parameters for touch */ if (common->tablet_id == 0x9A) { - common->wcmCapacity = 0; + common->wcmCapacity = 3; common->wcmCapacityDefault = 3; } else diff --git a/src/xdrv/wcmXCommand.c b/src/xdrv/wcmXCommand.c index 6d8b451..9908768 100644 --- a/src/xdrv/wcmXCommand.c +++ b/src/xdrv/wcmXCommand.c @@ -371,7 +371,7 @@ static int xf86WcmSetParam(LocalDevicePtr local, int param, int value) } break; case XWACOM_PARAM_CAPACITY: - if ((value < -1) || (value > 4)) + if ((value < -1) || (value > 5)) return BadValue; else if (common->wcmCapacity != value) { diff --git a/src/xdrv/xf86Wacom.c b/src/xdrv/xf86Wacom.c index e866feb..6424c0b 100755 --- a/src/xdrv/xf86Wacom.c +++ b/src/xdrv/xf86Wacom.c @@ -849,6 +849,7 @@ void xf86WcmReadPacket(LocalDevicePtr local) WacomDevicePtr priv = (WacomDevicePtr)local->private; WacomCommonPtr common = priv->common; int len, pos, cnt, remaining; + unsigned char * data; DBG(10, common->debugLevel, ErrorF("xf86WcmReadPacket: device=%s" " fd=%d \n", common->wcmDevice, local->fd)); @@ -884,7 +885,22 @@ void xf86WcmReadPacket(LocalDevicePtr local) pos = 0; - /* while there are whole packets present, parse data */ + /* while there are whole packets present, check the packet length + * for ISDv4 packet since it's different for pen and touch + */ + if (common->wcmForceDevice == DEVICE_ISDV4) + { + common->wcmPktLength = 9; + data = common->buffer; + if ( data[0] & 0x18 ) + { + if (common->wcmMaxCapacity) + common->wcmPktLength = 7; + else + common->wcmPktLength = 5; + } + } + while ((common->bufpos - pos) >= common->wcmPktLength) { /* parse packet */ @@ -895,6 +911,19 @@ void xf86WcmReadPacket(LocalDevicePtr local) break; } pos += cnt; + + if (common->wcmDevCls != &gWacomUSBDevice) + { + common->wcmPktLength = 9; + data = common->buffer + pos; + if ( data[0] & 0x18 ) + { + if (common->wcmMaxCapacity) + common->wcmPktLength = 7; + else + common->wcmPktLength = 5; + } + } } if (pos) diff --git a/src/xdrv/xf86WacomDefs.h b/src/xdrv/xf86WacomDefs.h index 2878153..235704f 100755 --- a/src/xdrv/xf86WacomDefs.h +++ b/src/xdrv/xf86WacomDefs.h @@ -164,25 +164,25 @@ struct _WacomDeviceRec int button[MAX_BUTTONS];/* buttons assignments */ unsigned keys[MAX_BUTTONS][256]; /* keystrokes assigned to buttons */ int relup; - unsigned rupk[256]; /* keystrokes assigned to relative wheel up event (default is button 4) */ + unsigned rupk[256]; /* keystrokes assigned to relative wheel up event (default is button 4) */ int reldn; - unsigned rdnk[256]; /* keystrokes assigned to relative wheel down event (default is button 5) */ + unsigned rdnk[256]; /* keystrokes assigned to relative wheel down event (default is button 5) */ int wheelup; - unsigned wupk[256]; /* keystrokes assigned to absolute wheel or throttle up event (default is button 4) */ + unsigned wupk[256]; /* keystrokes assigned to absolute wheel/throttle up event (default is button 4) */ int wheeldn; - unsigned wdnk[256]; /* keystrokes assigned to absolute wheel or throttle down event (default is button 5) */ + unsigned wdnk[256]; /* keystrokes assigned to absolute wheel/throttle down event (default is button 5) */ int striplup; - unsigned slupk[256]; /* keystrokes assigned to left strip up event (default is button 4) */ + unsigned slupk[256]; /* keystrokes assigned to left strip up event (default is button 4) */ int stripldn; - unsigned sldnk[256]; /* keystrokes assigned to left strip up event (default is button 5) */ + unsigned sldnk[256]; /* keystrokes assigned to left strip up event (default is button 5) */ int striprup; - unsigned srupk[256]; /* keystrokes assigned to right strip up event (default is button 4) */ + unsigned srupk[256]; /* keystrokes assigned to right strip up event (default is button 4) */ int striprdn; - unsigned srdnk[256]; /* keystrokes assigned to right strip up event (default is button 4) */ - int nbuttons; /* number of buttons for this subdevice */ - int naxes; /* number of axes */ + unsigned srdnk[256]; /* keystrokes assigned to right strip up event (default is button 4) */ + int nbuttons; /* number of buttons for this subdevice */ + int naxes; /* number of axes */ - WacomCommonPtr common;/* common info pointer */ + WacomCommonPtr common; /* common info pointer */ /* state fields */ int currentX; /* current X position */ @@ -224,8 +224,8 @@ struct _WacomDeviceRec int throttleValue; /* current throttle value */ /* JEJ - filters */ - int* pPressCurve; /* pressure curve */ - int nPressCtrl[4]; /* control points for curve */ + int* pPressCurve; /* pressure curve */ + int nPressCtrl[4]; /* control points for curve */ WacomToolPtr tool; /* The common tool-structure for this device */ WacomToolAreaPtr toolarea; /* The area defined for this device */ @@ -362,17 +362,16 @@ struct _WacomCommonRec int wcmMaxX; /* tablet max X value */ int wcmMaxY; /* tablet max Y value */ int wcmMaxZ; /* tablet max Z value */ - int wcmMaxTouchX; /* max touch X value */ - int wcmMaxTouchY; /* max touch Y value */ + int wcmMaxTouchX; /* touch panel max X value */ + int wcmMaxTouchY; /* touch panel max Y value */ + int wcmResolX; /* pen tool X resolution in points/inch */ + int wcmResolY; /* pen tool Y resolution in points/inch */ + int wcmTouchResolX; /* touch X resolution in points/inch */ + int wcmTouchResolY; /* touch Y resolution in points/inch */ + /* tablet Z resolution is equivalent + * to wcmMaxZ which is equal to 100% pressure */ int wcmMaxCapacity; /* max capacity value */ int wcmMaxDist; /* tablet max distance value */ - int wcmTouchResolX; /* touch X resolution in points/inch */ - int wcmTouchResolY; /* touch Y resolution in points/inch */ - int wcmResolX; /* tablet X resolution in points/inch */ - int wcmResolY; /* tablet Y resolution in points/inch */ - /* tablet Z resolution is equivalent - * to wcmMaxZ which is equal to 100% - * pressure */ int wcmMaxtiltX; /* styli max tilt in X directory */ int wcmMaxtiltY; /* styli max tilt in Y directory */ |