diff options
author | pingc <pingc> | 2008-08-31 20:23:18 +0000 |
---|---|---|
committer | pingc <pingc> | 2008-08-31 20:23:18 +0000 |
commit | be9b22da0e932e4c433e6bf23aa37e14ecc7c7dc (patch) | |
tree | 50e28bf0b4971c41f399f61d814a492642f00855 | |
parent | d808be5022778375831e9351242aaf282bdd559c (diff) | |
download | xf86-input-wacom-be9b22da0e932e4c433e6bf23aa37e14ecc7c7dc.tar.gz |
Added support for Bamboo1 Medium and Monarchrelease-0.8.1-4
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rwxr-xr-x | src/2.6.11/wacom_sys.c | 28 | ||||
-rwxr-xr-x | src/2.6.13/wacom_sys.c | 26 | ||||
-rwxr-xr-x | src/2.6.15/wacom_sys.c | 28 | ||||
-rw-r--r-- | src/2.6.16/wacom_sys.c | 31 | ||||
-rw-r--r-- | src/2.6.16/wacom_wac.c | 4 | ||||
-rwxr-xr-x | src/2.6.19/wacom_sys.c | 28 | ||||
-rwxr-xr-x | src/2.6.19/wacom_wac.c | 4 | ||||
-rwxr-xr-x | src/2.6.22/wacom_sys.c | 28 | ||||
-rwxr-xr-x | src/2.6.24/wacom_sys.c | 32 | ||||
-rwxr-xr-x | src/2.6.26/wacom_sys.c | 32 | ||||
-rwxr-xr-x | src/include/Xwacom.h | 1 | ||||
-rw-r--r-- | src/include/util-config.h.in | 3 | ||||
-rwxr-xr-x | src/util/wacusb.c | 8 | ||||
-rwxr-xr-x | src/util/xsetwacom.c | 7 | ||||
-rwxr-xr-x | src/wacomxi/wacomcpl-exec | 74 | ||||
-rwxr-xr-x | src/xdrv/wcmCommon.c | 26 | ||||
-rwxr-xr-x | src/xdrv/wcmConfig.c | 2 | ||||
-rwxr-xr-x | src/xdrv/wcmISDV4.c | 33 | ||||
-rwxr-xr-x | src/xdrv/wcmUSB.c | 18 | ||||
-rw-r--r-- | src/xdrv/wcmXCommand.c | 6 | ||||
-rwxr-xr-x | src/xdrv/xf86Wacom.c | 3 |
23 files changed, 254 insertions, 178 deletions
@@ -1,3 +1,11 @@ +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 + * Added a link to Bartosz Fabianowski's FreeBSD Wacom driver download page + * Merged bug 2074297 fix (Mike Auty) + * Fixed a few minor bugs + * Label 0.8.1-4 + 2008-08-11 Ping Cheng <pingc@wacom.com> * Merged patch 1994583 (Craig Wiegert) for wacom_sys.c * Merged patch 2035856 (Trifon Trifonov) for Uninit on Xorg 7.3 and later diff --git a/configure.in b/configure.in index 5a9c8ae..c1d3e29 100644 --- a/configure.in +++ b/configure.in @@ -768,7 +768,7 @@ if test "$enable_libwacomcfg" != no; then WCM_LIBS="$WCM_LIBS libwacomcfg.la" if test "$WCM_ENV_XF86CONFIG" = yes; then AC_DEFINE(WCM_XF86CONFIG,1,[libxf86config is included]) - WCM_LIBWACOMCFG_LIBS="-L$WCM_LIBWACOMCFG_LIBS -lxf86config -lm" + WCM_LIBWACOMCFG_LIBS="$WCM_LIBWACOMCFG_LIBS -lxf86config -lm" else AC_DEFINE(WCM_XF86CONFIG,0,[libxf86config isn't included]) fi diff --git a/src/2.6.11/wacom_sys.c b/src/2.6.11/wacom_sys.c index 7a3fbc9..71b8718 100755 --- a/src/2.6.11/wacom_sys.c +++ b/src/2.6.11/wacom_sys.c @@ -50,6 +50,7 @@ struct hid_descriptor /* defines to get/set USB message */ #define USB_REQ_GET_REPORT 0x01 #define USB_REQ_SET_REPORT 0x09 +#define WAC_HID_FEATURE_REPORT 0x03 static int usb_get_report(struct usb_interface *intf, unsigned char type, unsigned char id, void *buf, int size) @@ -422,11 +423,12 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i wacom->dev.close = wacom_close; wacom->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); - wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); + wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_STYLUS); input_set_abs_params(&wacom->dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); input_set_abs_params(&wacom->dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); input_set_abs_params(&wacom->dev, ABS_PRESSURE, 0, wacom_wac->features->pressure_max, 0, 0); if (wacom_wac->features->type == TABLETPC) { + wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOUCH); input_set_abs_params(&wacom->dev, ABS_RX, 0, wacom_wac->features->touch_x_max, 4, 0); input_set_abs_params(&wacom->dev, ABS_RY, 0, wacom_wac->features->touch_y_max, 4, 0); } @@ -443,19 +445,17 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i input_register_device(&wacom->dev); - /* TabletPC second bit 0 is for stylus mode*/ - if (wacom_wac->features->type == TABLETPC) - mode = 0; - - /* Ask the tablet to report tablet data. Repeat until it succeeds */ - do { - rep_data[0] = 2; - rep_data[1] = mode; - /* TabletPC doesn't need set report call */ - if (wacom_wac->features->type != TABLETPC) - usb_set_report(intf, USB_DT_STRING, 2, rep_data, 2); - usb_get_report(intf, USB_DT_STRING, 2, rep_data, 2); - } while (rep_data[1] != mode && limit++ < 5); + /* Ask the tablet to report tablet data if it is not a Tablet PC. + * Repeat until it succeeds + */ + if (wacom_wac->features->type != TABLETPC) { + do { + rep_data[0] = 2; + rep_data[1] = mode; + usb_set_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); + usb_get_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); + } while (rep_data[1] != mode && limit++ < 5); + } usb_set_intfdata(intf, wacom); kfree(report); diff --git a/src/2.6.13/wacom_sys.c b/src/2.6.13/wacom_sys.c index 368d998..488400b 100755 --- a/src/2.6.13/wacom_sys.c +++ b/src/2.6.13/wacom_sys.c @@ -49,6 +49,7 @@ struct hid_descriptor /* defines to get/set USB message */ #define USB_REQ_GET_REPORT 0x01 #define USB_REQ_SET_REPORT 0x09 +#define WAC_HID_FEATURE_REPORT 0x03 static int usb_get_report(struct usb_interface *intf, unsigned char type, unsigned char id, void *buf, int size) @@ -418,11 +419,12 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i wacom->dev.close = wacom_close; wacom->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); - wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); + wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_STYLUS); input_set_abs_params(&wacom->dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); input_set_abs_params(&wacom->dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); input_set_abs_params(&wacom->dev, ABS_PRESSURE, 0, wacom_wac->features->pressure_max, 0, 0); if (wacom_wac->features->type == TABLETPC) { + wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOUCH); input_set_abs_params(&wacom->dev, ABS_RX, 0, wacom_wac->features->touch_x_max, 4, 0); input_set_abs_params(&wacom->dev, ABS_RY, 0, wacom_wac->features->touch_y_max, 4, 0); } @@ -439,19 +441,17 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i input_register_device(&wacom->dev); - /* TabletPC second bit 0 is for stylus mode*/ - if (wacom_wac->features->type == TABLETPC) - mode = 0; - - /* Ask the tablet to report tablet data. Repeat until it succeeds */ - do { - rep_data[0] = 2; - rep_data[1] = mode; - /* TabletPC doesn't need set report call */ - if (wacom_wac->features->type != TABLETPC) + /* Ask the tablet to report tablet data if it is not a Tablet PC. + * Repeat until it succeeds + */ + if (wacom_wac->features->type != TABLETPC) { + do { + rep_data[0] = 2; + rep_data[1] = mode; usb_set_report(intf, USB_DT_STRING, 2, rep_data, 2); - usb_get_report(intf, USB_DT_STRING, 2, rep_data, 2); - } while (rep_data[1] != mode && limit++ < 5); + usb_get_report(intf, USB_DT_STRING, 2, rep_data, 2); + } while (rep_data[1] != mode && limit++ < 5); + } usb_set_intfdata(intf, wacom); kfree(report); diff --git a/src/2.6.15/wacom_sys.c b/src/2.6.15/wacom_sys.c index 6d07a95..ad7b31d 100755 --- a/src/2.6.15/wacom_sys.c +++ b/src/2.6.15/wacom_sys.c @@ -50,6 +50,7 @@ struct hid_descriptor /* defines to get/set USB message */ #define USB_REQ_GET_REPORT 0x01 #define USB_REQ_SET_REPORT 0x09 +#define WAC_HID_FEATURE_REPORT 0x03 static int usb_get_report(struct usb_interface *intf, unsigned char type, unsigned char id, void *buf, int size) @@ -395,10 +396,11 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i } input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); - input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); + input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_STYLUS); input_set_abs_params(input_dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); input_set_abs_params(input_dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); if (wacom_wac->features->type == TABLETPC) { + input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOUCH); input_set_abs_params(input_dev, ABS_RX, 0, wacom_wac->features->touch_x_max, 4, 0); input_set_abs_params(input_dev, ABS_RY, 0, wacom_wac->features->touch_y_max, 4, 0); } @@ -416,19 +418,17 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i input_register_device(wacom->dev); - /* TabletPC second bit 0 is for stylus mode*/ - if (wacom_wac->features->type == TABLETPC) - mode = 0; - - /* Ask the tablet to report tablet data. Repeat until it succeeds */ - do { - rep_data[0] = 2; - rep_data[1] = mode; - /* TabletPC doesn't need set report call */ - if (wacom_wac->features->type != TABLETPC) - usb_set_report(intf, USB_DT_STRING, 2, rep_data, 2); - usb_get_report(intf, USB_DT_STRING, 2, rep_data, 2); - } while (rep_data[1] != mode && limit++ < 5); + /* Ask the tablet to report tablet data if it is not a Tablet PC. + * Repeat until it succeeds + */ + if (wacom_wac->features->type != TABLETPC) { + do { + rep_data[0] = 2; + rep_data[1] = mode; + usb_set_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); + usb_get_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); + } while (rep_data[1] != mode && limit++ < 5); + } usb_set_intfdata(intf, wacom); return 0; diff --git a/src/2.6.16/wacom_sys.c b/src/2.6.16/wacom_sys.c index cf38a1a..11f64ac 100644 --- a/src/2.6.16/wacom_sys.c +++ b/src/2.6.16/wacom_sys.c @@ -47,8 +47,10 @@ struct hid_descriptor __le16 wDescriptorLength; } __attribute__ ((packed)); -/* defines to get/set USB message */#define USB_REQ_GET_REPORT 0x01 +/* defines to get/set USB message */ +#define USB_REQ_GET_REPORT 0x01 #define USB_REQ_SET_REPORT 0x09 +#define WAC_HID_FEATURE_REPORT 0x03 static int usb_get_report(struct usb_interface *intf, unsigned char type, unsigned char id, void *buf, int size) @@ -396,10 +398,11 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i } input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); - input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); + input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_STYLUS); input_set_abs_params(input_dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); input_set_abs_params(input_dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); if (wacom_wac->features->type == TABLETPC) { + input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOUCH); input_set_abs_params(input_dev, ABS_RX, 0, wacom_wac->features->touch_x_max, 4, 0); input_set_abs_params(input_dev, ABS_RY, 0, wacom_wac->features->touch_y_max, 4, 0); } @@ -417,19 +420,17 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i input_register_device(wacom->dev); - /* TabletPC second bit 0 is for stylus mode*/ - if (wacom_wac->features->type == TABLETPC) - mode = 0; - - /* Ask the tablet to report tablet data. Repeat until it succeeds */ - do { - rep_data[0] = 2; - rep_data[1] = mode; - /* TabletPC doesn't need set report call */ - if (wacom_wac->features->type != TABLETPC) - usb_set_report(intf, USB_DT_STRING, 2, rep_data, 2); - usb_get_report(intf, USB_DT_STRING, 2, rep_data, 2); - } while (rep_data[1] != mode && limit++ < 5); + /* Ask the tablet to report tablet data if it is not a Tablet PC. + * Repeat until it succeeds + */ + if (wacom_wac->features->type != TABLETPC) { + do { + rep_data[0] = 2; + rep_data[1] = mode; + usb_set_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); + usb_get_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); + } while (rep_data[1] != mode && limit++ < 5); + } usb_set_intfdata(intf, wacom); kfree(report); diff --git a/src/2.6.16/wacom_wac.c b/src/2.6.16/wacom_wac.c index 3e86e8b..b36e18d 100644 --- a/src/2.6.16/wacom_wac.c +++ b/src/2.6.16/wacom_wac.c @@ -705,6 +705,7 @@ static struct wacom_features wacom_features[] = { { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 63, WACOM_G4, 0, 0 }, { "Wacom BambooFun 4x5", 9, 14760, 9225, 511, 63, WACOM_MO, 0, 0 }, { "Wacom BambooFun 6x8", 9, 21648, 13530, 511, 63, WACOM_MO, 0, 0 }, + { "Wacom Bamboo1 Medium",8, 16704, 12064, 511, 63, GRAPHIRE, 0, 0 }, { "Wacom Volito", 8, 5104, 3712, 511, 63, GRAPHIRE, 0, 0 }, { "Wacom PenStation2", 8, 3250, 2320, 255, 63, GRAPHIRE, 0, 0 }, { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE, 0, 0 }, @@ -728,6 +729,7 @@ static struct wacom_features wacom_features[] = { { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL, 0, 0 }, { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL, 0, 0 }, { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL, 0, 0 }, + { "Wacom DTU1931", 8, 37832, 30305, 511, 0, PL, 0, 0 }, { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PTU, 0, 0 }, { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 31, INTUOS, 0, 0 }, { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS, 0, 0 }, @@ -762,6 +764,7 @@ static struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x17) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x18) }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x19) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x60) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x61) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, @@ -785,6 +788,7 @@ static struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x39) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC4) }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC7) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x41) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x42) }, diff --git a/src/2.6.19/wacom_sys.c b/src/2.6.19/wacom_sys.c index 4134709..6ece78a 100755 --- a/src/2.6.19/wacom_sys.c +++ b/src/2.6.19/wacom_sys.c @@ -50,6 +50,7 @@ struct hid_descriptor /* defines to get/set USB message */ #define USB_REQ_GET_REPORT 0x01 #define USB_REQ_SET_REPORT 0x09 +#define WAC_HID_FEATURE_REPORT 0x03 static int usb_get_report(struct usb_interface *intf, unsigned char type, unsigned char id, void *buf, int size) @@ -390,11 +391,12 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i } input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); - input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); + input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_STYLUS); input_set_abs_params(input_dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); input_set_abs_params(input_dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom_wac->features->pressure_max, 0, 0); if (wacom_wac->features->type == TABLETPC) { + input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOUCH); input_set_abs_params(input_dev, ABS_RX, 0, wacom_wac->features->touch_x_max, 4, 0); input_set_abs_params(input_dev, ABS_RY, 0, wacom_wac->features->touch_y_max, 4, 0); } @@ -411,19 +413,17 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i input_register_device(wacom->dev); - /* TabletPC second bit 0 is for stylus mode*/ - if (wacom_wac->features->type == TABLETPC) - mode = 0; - - /* Ask the tablet to report tablet data. Repeat until it succeeds */ - do { - rep_data[0] = 2; - rep_data[1] = mode; - /* TabletPC doesn't need set report call */ - if (wacom_wac->features->type != TABLETPC) - usb_set_report(intf, USB_DT_STRING, 2, rep_data, 2); - usb_get_report(intf, USB_DT_STRING, 2, rep_data, 2); - } while (rep_data[1] != mode && limit++ < 5); + /* Ask the tablet to report tablet data if it is not a Tablet PC. + * Repeat until it succeeds + */ + if (wacom_wac->features->type != TABLETPC) { + do { + rep_data[0] = 2; + rep_data[1] = mode; + usb_set_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); + usb_get_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); + } while (rep_data[1] != mode && limit++ < 5); + } usb_set_intfdata(intf, wacom); kfree(report); diff --git a/src/2.6.19/wacom_wac.c b/src/2.6.19/wacom_wac.c index 5740bee..d59901e 100755 --- a/src/2.6.19/wacom_wac.c +++ b/src/2.6.19/wacom_wac.c @@ -700,6 +700,7 @@ static struct wacom_features wacom_features[] = { { "Wacom Graphire4 6x8", 8, 16704, 12064, 511, 63, WACOM_G4, 0, 0 }, { "Wacom BambooFun 4x5", 9, 14760, 9225, 511, 63, WACOM_MO, 0, 0 }, { "Wacom BambooFun 6x8", 9, 21648, 13530, 511, 63, WACOM_MO, 0, 0 }, + { "Wacom Bamboo1 Medium",8, 16704, 12064, 511, 63, GRAPHIRE, 0, 0 }, { "Wacom Volito", 8, 5104, 3712, 511, 63, GRAPHIRE, 0, 0 }, { "Wacom PenStation2", 8, 3250, 2320, 255, 63, GRAPHIRE, 0, 0 }, { "Wacom Volito2 4x5", 8, 5104, 3712, 511, 63, GRAPHIRE, 0, 0 }, @@ -723,6 +724,7 @@ static struct wacom_features wacom_features[] = { { "Wacom DTU710", 8, 34080, 27660, 511, 0, PL, 0, 0 }, { "Wacom DTF521", 8, 6282, 4762, 511, 0, PL, 0, 0 }, { "Wacom DTF720", 8, 6858, 5506, 511, 0, PL, 0, 0 }, + { "Wacom DTU1931", 8, 37832, 30305, 511, 0, PL, 0, 0 }, { "Wacom Cintiq Partner",8, 20480, 15360, 511, 0, PTU, 0, 0 }, { "Wacom Intuos2 4x5", 10, 12700, 10600, 1023, 31, INTUOS, 0, 0 }, { "Wacom Intuos2 6x8", 10, 20320, 16240, 1023, 31, INTUOS, 0, 0 }, @@ -757,6 +759,7 @@ static struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x16) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x17) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x18) }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x19) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x60) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x61) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x62) }, @@ -780,6 +783,7 @@ static struct usb_device_id wacom_ids[] = { { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x39) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC0) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC4) }, + { USB_DEVICE(USB_VENDOR_ID_WACOM, 0xC7) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x03) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x41) }, { USB_DEVICE(USB_VENDOR_ID_WACOM, 0x42) }, diff --git a/src/2.6.22/wacom_sys.c b/src/2.6.22/wacom_sys.c index 6569eb9..0509116 100755 --- a/src/2.6.22/wacom_sys.c +++ b/src/2.6.22/wacom_sys.c @@ -50,6 +50,7 @@ struct hid_descriptor /* defines to get/set USB message */ #define USB_REQ_GET_REPORT 0x01 #define USB_REQ_SET_REPORT 0x09 +#define WAC_HID_FEATURE_REPORT 0x03 static int usb_get_report(struct usb_interface *intf, unsigned char type, unsigned char id, void *buf, int size) @@ -392,10 +393,11 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i } input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); - input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); + input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_STYLUS); input_set_abs_params(input_dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); input_set_abs_params(input_dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); if (wacom_wac->features->type == TABLETPC) { + input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOUCH); input_set_abs_params(input_dev, ABS_RX, 0, wacom_wac->features->touch_x_max, 4, 0); input_set_abs_params(input_dev, ABS_RY, 0, wacom_wac->features->touch_y_max, 4, 0); } @@ -415,19 +417,17 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i if (error) goto fail3; - /* TabletPC second bit 0 is stylus mode*/ - if (wacom_wac->features->type == TABLETPC) - mode = 0; - - /* Ask the tablet to report tablet data. Repeat until it succeeds */ - do { - rep_data[0] = 2; - rep_data[1] = mode; - /* TabletPC doesn't need set report call */ - if (wacom_wac->features->type != TABLETPC) - usb_set_report(intf, USB_DT_STRING, 2, rep_data, 2); - usb_get_report(intf, USB_DT_STRING, 2, rep_data, 2); - } while (rep_data[1] != mode && limit++ < 5); + /* Ask the tablet to report tablet data if it is not a Tablet PC. + * Repeat until it succeeds + */ + if (wacom_wac->features->type != TABLETPC) { + do { + rep_data[0] = 2; + rep_data[1] = mode; + usb_set_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); + usb_get_report(intf, WAC_HID_FEATURE_REPORT, 2, rep_data, 2); + } while (rep_data[1] != mode && limit++ < 5); + } usb_set_intfdata(intf, wacom); kfree(report); diff --git a/src/2.6.24/wacom_sys.c b/src/2.6.24/wacom_sys.c index 5560186..e8b4e6c 100755 --- a/src/2.6.24/wacom_sys.c +++ b/src/2.6.24/wacom_sys.c @@ -50,6 +50,7 @@ struct hid_descriptor /* defines to get/set USB message */ #define USB_REQ_GET_REPORT 0x01 #define USB_REQ_SET_REPORT 0x09 +#define WAC_HID_FEATURE_REPORT 0x03 static int usb_get_report(struct usb_interface *intf, unsigned char type, unsigned char id, void *buf, int size) @@ -405,12 +406,12 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i } input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); - input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_PEN) | - BIT_MASK(BTN_TOUCH) | BIT_MASK(BTN_STYLUS); + input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_PEN) | BIT_MASK(BTN_STYLUS); input_set_abs_params(input_dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); input_set_abs_params(input_dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom_wac->features->pressure_max, 0, 0); if (wacom_wac->features->type == TABLETPC) { + input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOUCH); input_set_abs_params(input_dev, ABS_RX, 0, wacom_wac->features->touch_x_max, 4, 0); input_set_abs_params(input_dev, ABS_RY, 0, wacom_wac->features->touch_y_max, 4, 0); } @@ -429,21 +430,18 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i if (error) goto fail3; - /* TabletPC second bit 0 is stylus mode*/ - if (wacom_wac->features->type == TABLETPC) - mode = 0; - - /* Ask the tablet to report tablet data. Repeat until it succeeds */ - do { - rep_data[0] = 2; - rep_data[1] = mode; - error = 0; - /* TabletPC doesn't need set report call */ - if (wacom_wac->features->type != TABLETPC) - error = usb_set_report(intf, USB_DT_STRING, 2, rep_data, 2); - if(error >= 0) - error = usb_get_report(intf, USB_DT_STRING, 2, rep_data, 2); - } while (((error <= 0) || (rep_data[1] != mode)) && limit++ < 5); + /* Ask the tablet to report tablet data if it is not a Tablet PC. + * Repeat until it succeeds + */ + if (wacom_wac->features->type != TABLETPC) { + do { + rep_data[0] = 2; + rep_data[1] = mode; + 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); + } usb_set_intfdata(intf, wacom); kfree(report); diff --git a/src/2.6.26/wacom_sys.c b/src/2.6.26/wacom_sys.c index f88cf1d..d73b0b8 100755 --- a/src/2.6.26/wacom_sys.c +++ b/src/2.6.26/wacom_sys.c @@ -50,6 +50,7 @@ struct hid_descriptor /* defines to get/set USB message */ #define USB_REQ_GET_REPORT 0x01 #define USB_REQ_SET_REPORT 0x09 +#define WAC_HID_FEATURE_REPORT 0x03 static int usb_get_report(struct usb_interface *intf, unsigned char type, unsigned char id, void *buf, int size) @@ -425,12 +426,12 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i } input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); - input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_PEN) | - BIT_MASK(BTN_TOUCH) | BIT_MASK(BTN_STYLUS); + input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOOL_PEN) | BIT_MASK(BTN_STYLUS); input_set_abs_params(input_dev, ABS_X, 0, wacom_wac->features->x_max, 4, 0); input_set_abs_params(input_dev, ABS_Y, 0, wacom_wac->features->y_max, 4, 0); input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom_wac->features->pressure_max, 0, 0); if (wacom_wac->features->type == TABLETPC) { + input_dev->keybit[BIT_WORD(BTN_DIGI)] |= BIT_MASK(BTN_TOUCH); input_set_abs_params(input_dev, ABS_RX, 0, wacom_wac->features->touch_x_max, 4, 0); input_set_abs_params(input_dev, ABS_RY, 0, wacom_wac->features->touch_y_max, 4, 0); } @@ -449,21 +450,18 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i if (error) goto fail3; - /* TabletPC second bit 0 is stylus mode*/ - if (wacom_wac->features->type == TABLETPC) - mode = 0; - - /* Ask the tablet to report tablet data. Repeat until it succeeds */ - do { - rep_data[0] = 2; - rep_data[1] = mode; - error = 0; - /* TabletPC doesn't need set report call */ - if (wacom_wac->features->type != TABLETPC) - error = usb_set_report(intf, USB_DT_STRING, 2, rep_data, 2); - if(error >= 0) - error = usb_get_report(intf, USB_DT_STRING, 2, rep_data, 2); - } while (((error <= 0) || (rep_data[1] != mode)) && limit++ < 5); + /* Ask the tablet to report tablet data if it is not a Tablet PC. + * Repeat until it succeeds + */ + 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); + 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); + } usb_set_intfdata(intf, wacom); kfree(report); diff --git a/src/include/Xwacom.h b/src/include/Xwacom.h index 90fec3e..b92d608 100755 --- a/src/include/Xwacom.h +++ b/src/include/Xwacom.h @@ -133,6 +133,7 @@ #define XWACOM_PARAM_STOPY7 380 #define XWACOM_PARAM_SBOTTOMX7 381 #define XWACOM_PARAM_SBOTTOMY7 382 +#define XWACOM_PARAM_XSCALING 383 #define TV_NONE 0 #define TV_ABOVE_BELOW 1 diff --git a/src/include/util-config.h.in b/src/include/util-config.h.in index ee28a82..9fc0730 100644 --- a/src/include/util-config.h.in +++ b/src/include/util-config.h.in @@ -9,6 +9,9 @@ /* Enable the Linux Input subsystem */ #undef WCM_ENABLE_LINUXINPUT +/* Some X.org versions require that the events are scaled to screen size */ +#undef WCM_XORG_TABLET_SCALING + /* IsXExtensionPointer is only defined in later X.org releases */ #undef WCM_ISXEXTENSIONPOINTER diff --git a/src/util/wacusb.c b/src/util/wacusb.c index 2ed845d..f1c3b84 100755 --- a/src/util/wacusb.c +++ b/src/util/wacusb.c @@ -222,6 +222,7 @@ static int USBIdentifyModel(USBTABLET* pUSB); { "MODEL_DTU710", "Wacom PL710", 9, 0x39 }, { "MODEL_DTF720", "Wacom DTF720", 10, 0xC0 }, { "MODEL_DTF521", "Wacom DTF521", 11, 0xC4 }, + { "MODEL_DTU1931", "Wacom DTU1931", 12, 0xC7 }, { NULL } }; @@ -257,9 +258,10 @@ static int USBIdentifyModel(USBTABLET* pUSB); static USBSUBTYPE xBamboo[] = { - { "MTE_450", "Wacom Bamboo", 1, 0x65 }, - { "CTE_450", "Wacom BambooFun 4x5", 2, 0x17 }, - { "CTE_650", "Wacom BambooFun 6x8", 3, 0x18 }, + { "MTE_450", "Wacom Bamboo", 1, 0x65 }, + { "CTE_450", "Wacom BambooFun 4x5", 2, 0x17 }, + { "CTE_650", "Wacom BambooFun 6x8", 3, 0x18 }, + { "CTE_631", "Wacom Bamboo1 Medium", 4, 0x19 }, { NULL } }; diff --git a/src/util/xsetwacom.c b/src/util/xsetwacom.c index 92dc03c..a492301 100755 --- a/src/util/xsetwacom.c +++ b/src/util/xsetwacom.c @@ -33,10 +33,11 @@ ** 2007-07-24 0.1.4 - PC - Support Screen_No option ** 2008-01-17 0.1.5 - PC - Add DISPLAYTOGGLE command ** 2008-03-24 0.1.6 - PC - Added Touch for serial Tablet PC (ISDv4) +** 2008-08-27 0.1.7 - PC - Added get XORGVER to xsetwacom ** ****************************************************************************/ -#define XSETWACOM_VERSION "0.1.6" +#define XSETWACOM_VERSION "0.1.7" #include "../include/util-config.h" @@ -607,6 +608,10 @@ static PARAMINFO gParamInfo[] = "Returns number of screens configured for the desktop. ", XWACOM_PARAM_NUMSCREEN, VALUE_REQUIRED }, + { "XScaling", + "Returns the status of XSCALING is set or not. ", + XWACOM_PARAM_XSCALING, VALUE_REQUIRED }, + { NULL } }; diff --git a/src/wacomxi/wacomcpl-exec b/src/wacomxi/wacomcpl-exec index 005f06e..b4e0ea8 100755 --- a/src/wacomxi/wacomcpl-exec +++ b/src/wacomxi/wacomcpl-exec @@ -54,7 +54,7 @@ set ignoreButton 34 set doubleClickB 35 set displayToggleB 36 set keystrokeB 37 - +set maxNumTablets 199 proc updateCurrentScreenInfo {} { global device numScreens currentScreen @@ -138,8 +138,18 @@ proc calibrationSequence {which xDev yDev} { global swapThresh screenWidth screenHeight global getDeviceModel screenXBottom screenYBottom + set scaling [exec xsetwacom get $device xscaling] + set bottomX [exec xsetwacom getdefault $device BottomX] + set bottomY [exec xsetwacom getdefault $device BottomY] + if { $scaling == 1 } { + set xNewDev [expr (($xDev - $screenX_org) * $bottomX)] + set xDev [expr ($xNewDev / ($screenXBottom - $screenX_org))] + set yNewDev [expr (($yDev - $screenY_org) * $bottomY)] + set yDev [expr ($yNewDev / ($screenYBottom - $screenY_org))] + } set calibResults(xDev,$which) $xDev set calibResults(yDev,$which) $yDev + if { $which == 0 } { .topleft.m configure -background "#505075" wacomxi::bindevent .topleft.m $device <ButtonRelease> "" @@ -1488,19 +1498,33 @@ proc updateKeys {} { } } +proc touchState { theCButton } { + global device touchButton getDeviceModel + + set touchButton 0 + if { $touchButton == [exec xsetwacom get $device touch] } { + 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 + } +} + proc initialTouch {} { - global device getDeviceModel currentW touchButton + global device getDeviceModel currentW global getOption getOptionDefault Option hasCapacity set model $getDeviceModel($device,model) - set Option(1) "Touch" set Option(1) "Capacity" - getDeviceOptionProc $device 2 - - checkbutton $currentW.f.touch -text "Disable Touch" -anchor w \ - -variable touchButton -state normal -command switchTouch + getDeviceOptionProc $device 1 + touchState $currentW.f.touch grid $currentW.f.touch -row 0 -column 2 frame $currentW.f.group -bd 10 -bg beige -width 150 -height 150 @@ -1525,10 +1549,10 @@ proc initialTouch {} { } proc updateTouch {} { - global currentW getOptionDefault device + global currentW getOption device set value [ $currentW.f.group.scale get ] - if { $value != $getOption($device,touch) } { + if { $value != $getOption($device,Capacity) } { updateXinitrc $device Capacity $value set getOption($device,Capacity) $value } @@ -1544,18 +1568,19 @@ proc defaultTouch {} { } proc switchTouch {} { - global wName device touchButton - - if { $touchButton != [ exec xsetwacom get $device touch ] } { - exec xsetwacom set $device touch $touchButton - updateXinitrc $device touch $touchButton - } + global device touchButton - if { $touchButton == 0 } { - .panel.calibrate configure -state normal - } else { - .panel.calibrate configure -state disabled - } + if { $touchButton == [ exec xsetwacom get $device touch ] } { + if { $touchButton == 0 } { + .panel.calibrate configure -state normal + exec xsetwacom set $device touch 1 + updateXinitrc $device touch 1 + } else { + .panel.calibrate configure -state disabled + exec xsetwacom set $device touch 0 + updateXinitrc $device touch 0 + } + } } proc createPanel { pressure button mapping calibrate } { @@ -1596,9 +1621,7 @@ proc createPanel { pressure button mapping calibrate } { -state normal -command "displaySubWindow \ updateTouch defaultTouch initialTouch 1 0 0" } else { - checkbutton .panel.pressure -text "Disable Touch" -anchor w \ - -variable touchButton -state normal -command switchTouch - + touchState .panel.pressure } } else { set wName(1) "Feel" @@ -1648,8 +1671,9 @@ proc createPanel { pressure button mapping calibrate } { proc updateModelInfo { } { global isLCD numPadButtons numPadRings hasPad hasTouch global numPadStrips numPadAbsW numPadRelW hasCapacity + global maxNumTablets - for { set i 0 } { $i <= 198 } { incr i 1 } { + for { set i 0 } { $i <= $maxNumTablets } { incr i 1 } { set isLCD($i) 0 set numPadButtons($i) 0 set numPadRings($i) 0 @@ -1673,7 +1697,7 @@ proc updateModelInfo { } { set hasCapacity(154) 1 #Cintiq - for { set i 192 } { $i <= 198 } { incr i 1 } { + for { set i 192 } { $i <= 199 } { incr i 1 } { set isLCD($i) 1 } diff --git a/src/xdrv/wcmCommon.c b/src/xdrv/wcmCommon.c index c585ffd..0b9873f 100755 --- a/src/xdrv/wcmCommon.c +++ b/src/xdrv/wcmCommon.c @@ -783,12 +783,6 @@ static void sendCommonEvents(LocalDevicePtr local, const WacomDeviceState* ds, i { WacomDevicePtr priv = (WacomDevicePtr) local->private; int buttons = ds->buttons; - int naxes = priv->naxes; - - /* don't emit proximity events if device does not support proximity */ - if ((local->dev->proximity && !priv->oldProximity)) - xf86PostProximityEvent(local->dev, 1, 0, naxes, - x, y, z, v3, v4, v5); if (priv->oldButtons != buttons) xf86WcmSendButtons(local,buttons,x,y,z,v3,v4,v5); @@ -972,7 +966,7 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds) /* The +-0.4 is to increase the sensitivity in relative mode. * Must be sensitive to which way the tool is moved or one way * will get a severe penalty for small movements. */ - if(is_absolute) { + if(is_absolute) { x -= priv->topX; y -= priv->topY; } @@ -985,7 +979,13 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds) x += priv->screenTopX[priv->currentScreen]; y += priv->screenTopY[priv->currentScreen]; } + priv->currentSX = x; + priv->currentSY = y; #endif + /* don't emit proximity events if device does not support proximity */ + if ((local->dev->proximity && !priv->oldProximity)) + xf86PostProximityEvent(local->dev, 1, 0, naxes, x, y, z, v3, v4, v5); + /* Move the cursor to where it should be before sending button events */ if(!(priv->flags & BUTTONS_ONLY_FLAG)) xf86PostMotionEvent(local->dev, is_absolute, @@ -999,6 +999,13 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds) { buttons = 0; +#ifdef WCM_XORG_TABLET_SCALING + /* Ugly hack for Xorg 7.3, which doesn't call xf86WcmDevConvert + * for coordinate conversion at the moment */ + x = priv->currentSX; + y = priv->currentSY; +#endif + /* reports button up when the device has been * down and becomes out of proximity */ if (priv->oldButtons) @@ -1016,6 +1023,11 @@ void xf86WcmSendEvents(LocalDevicePtr local, const WacomDeviceState* ds) y = 0; if ( v3 || v4 || v5 ) xf86WcmSetScreen(local, &x, &y); + + /* don't emit proximity events if device does not support proximity */ + if ((local->dev->proximity && !priv->oldProximity)) + xf86PostProximityEvent(local->dev, 1, 0, naxes, x, y, z, v3, v4, v5); + sendCommonEvents(local, ds, x, y, z, v3, v4, v5); is_proximity = 1; /* xf86PostMotionEvent is only needed to post the valuators diff --git a/src/xdrv/wcmConfig.c b/src/xdrv/wcmConfig.c index 687bb48..4925698 100755 --- a/src/xdrv/wcmConfig.c +++ b/src/xdrv/wcmConfig.c @@ -205,7 +205,7 @@ LocalDevicePtr xf86WcmAllocate(char* name, int flag) common->wcmTouch = 0; /* touch is disabled */ common->wcmTouchDefault = 0; /* default to disable when touch isn't supported */ common->wcmCapacity = -1; /* Capacity is disabled */ - common->wcmCapacityDefault = 3; /* default to -1 when capacity isn't supported */ + common->wcmCapacityDefault = -1; /* default to -1 when capacity isn't supported */ /* 3 when capacity is supported */ common->wcmRotate = ROTATE_NONE; /* default tablet rotation to off */ common->wcmMaxX = 0; /* max digitizer logical X value */ diff --git a/src/xdrv/wcmISDV4.c b/src/xdrv/wcmISDV4.c index 5c086ee..779cdf2 100755 --- a/src/xdrv/wcmISDV4.c +++ b/src/xdrv/wcmISDV4.c @@ -224,27 +224,20 @@ static int isdv4GetRanges(LocalDevicePtr local) /* 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 */ switch (data[2] & 0x07) { - case 0x00: - common->wcmPktLength = 5; - common->tablet_id = 0x93; - break; case 0x01: common->wcmPktLength = 7; common->tablet_id = 0x9A; break; case 0x02: - common->wcmPktLength = 7; - common->tablet_id = 0x9F; - break; - case 0x03: - common->wcmPktLength = 5; - common->tablet_id = 0x93; - break; case 0x04: common->wcmPktLength = 7; common->tablet_id = 0x9F; @@ -269,16 +262,8 @@ static int isdv4GetRanges(LocalDevicePtr local) if (common->wcmMaxX && common->wcmMaxY && common->wcmMaxTouchX) { - char *s; - - /* Touch resolution */ - common->wcmTouchResolX = common->wcmMaxTouchX * - common->wcmResolX / common->wcmMaxX; - common->wcmTouchResolY = common->wcmMaxTouchY * - common->wcmResolY / common->wcmMaxY; - - s = xf86FindOptionValue(local->options, "Touch"); - if (!s) /* touch option wasn't set in xorg.conf */ + char *s = xf86FindOptionValue(local->options, "Touch"); + if ( !s || (strstr(s, "on")) ) /* touch option is on */ { common->wcmTouch = 1; } @@ -286,6 +271,12 @@ static int isdv4GetRanges(LocalDevicePtr local) /* 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; } } diff --git a/src/xdrv/wcmUSB.c b/src/xdrv/wcmUSB.c index b98b70e..3e86298 100755 --- a/src/xdrv/wcmUSB.c +++ b/src/xdrv/wcmUSB.c @@ -449,6 +449,7 @@ static struct { 0x39, 508, 508, &usbCintiq }, /* PL710 */ { 0xC0, 508, 508, &usbCintiq }, /* DTF720 */ { 0xC4, 508, 508, &usbCintiq }, /* DTF521 */ + { 0xC7, 2540, 2540, &usbCintiq }, /* DTU1931 */ { 0x41, 2540, 2540, &usbIntuos2 }, /* Intuos2 4x5 */ { 0x42, 2540, 2540, &usbIntuos2 }, /* Intuos2 6x8 */ @@ -522,6 +523,19 @@ Bool usbWcmInit(LocalDevicePtr local, char* id, float *version) common->wcmCapacity = -1; common->wcmCapacityDefault = -1; } + + if (common->tablet_id == 0x9A || common->tablet_id == 0x93) + { + 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; + } } if (!common->wcmModel) @@ -1045,6 +1059,10 @@ static void usbParseChannel(LocalDevicePtr local, int channel, int serial) } } /* next event */ + /* don't send touch event when touch isn't enabled */ + if (ds->device_type == TOUCH_ID && !common->wcmTouch) + return; + /* it is an out-prox when id or/and serial number is zero for kernel 2.4 */ if ((!ds->device_id || !ds->serial_num) && !USE_SYN_REPORTS(common)) ds->proximity = 0; diff --git a/src/xdrv/wcmXCommand.c b/src/xdrv/wcmXCommand.c index 69bdc68..6d8b451 100644 --- a/src/xdrv/wcmXCommand.c +++ b/src/xdrv/wcmXCommand.c @@ -832,6 +832,12 @@ static int xf86WcmGetParam(LocalDevicePtr local, int param) return priv->screen_no; case XWACOM_PARAM_NUMSCREEN: return priv->numScreen; + case XWACOM_PARAM_XSCALING: +#ifdef WCM_XORG_TABLET_SCALING + return 1; +#else + return 0; +#endif } DBG(10, priv->debugLevel, ErrorF("xf86WcmGetParam invalid param %d\n", param)); return -1; diff --git a/src/xdrv/xf86Wacom.c b/src/xdrv/xf86Wacom.c index 8b8b150..e866feb 100755 --- a/src/xdrv/xf86Wacom.c +++ b/src/xdrv/xf86Wacom.c @@ -72,9 +72,10 @@ * 2008-05-14 47-pc0.8.0-2 - Update rotation routine * 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 */ -static const char identification[] = "$Identification: 47-0.8.1-1 $"; +static const char identification[] = "$Identification: 47-0.8.1-4 $"; /****************************************************************************/ |