diff options
author | Enrico Ros <enrico.ros@gmail.com> | 2009-12-10 02:30:46 +0100 |
---|---|---|
committer | Enrico Ros <enrico.ros@gmail.com> | 2009-12-10 02:30:46 +0100 |
commit | bad2015301a83c0c50d18c177d57b1105a173673 (patch) | |
tree | 68753589a4a55fe00c38dae2b1b53011beb9e551 | |
parent | 21526f944f5f7731ce6a661796571c0dfbe802e7 (diff) |
Add USB devices 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, mapped to the Bamboo tablet.
Maybe it will be better to map them to the Bamboo Fun functions, even if the
commercial name is different. Model checking needs to be cleaned here.
Applied most of the wcmUSB.c.patch -r34 as found on UbuntuForums.
Signed-off-by: Enrico Ros <enrico.ros@gmail.com>
-rw-r--r-- | src/wcmUSB.c | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/src/wcmUSB.c b/src/wcmUSB.c index 5e8abfb..72f3057 100644 --- a/src/wcmUSB.c +++ b/src/wcmUSB.c | |||
@@ -430,6 +430,12 @@ static struct | |||
430 | { 0x19, 2032, 2032, &usbBamboo1 }, /* Bamboo1 Medium*/ | 430 | { 0x19, 2032, 2032, &usbBamboo1 }, /* Bamboo1 Medium*/ |
431 | { 0x81, 2032, 2032, &usbGraphire4 }, /* Graphire4 6x8 BlueTooth */ | 431 | { 0x81, 2032, 2032, &usbGraphire4 }, /* Graphire4 6x8 BlueTooth */ |
432 | 432 | ||
433 | { 0xD1, 2540, 2540, &usbBamboo }, /* CTL-460 */ | ||
434 | { 0xD4, 2540, 2540, &usbBamboo }, /* CTH-461 */ | ||
435 | { 0xD3, 2540, 2540, &usbBamboo }, /* CTL-660 */ | ||
436 | { 0xD2, 2540, 2540, &usbBamboo }, /* CTL-461/S */ | ||
437 | { 0xD0, 2540, 2540, &usbBamboo }, /* Bamboo Touch */ | ||
438 | |||
433 | { 0x20, 2540, 2540, &usbIntuos }, /* Intuos 4x5 */ | 439 | { 0x20, 2540, 2540, &usbIntuos }, /* Intuos 4x5 */ |
434 | { 0x21, 2540, 2540, &usbIntuos }, /* Intuos 6x8 */ | 440 | { 0x21, 2540, 2540, &usbIntuos }, /* Intuos 6x8 */ |
435 | { 0x22, 2540, 2540, &usbIntuos }, /* Intuos 9x12 */ | 441 | { 0x22, 2540, 2540, &usbIntuos }, /* Intuos 9x12 */ |
@@ -497,6 +503,7 @@ static struct | |||
497 | Bool usbWcmInit(LocalDevicePtr local, char* id, float *version) | 503 | Bool usbWcmInit(LocalDevicePtr local, char* id, float *version) |
498 | { | 504 | { |
499 | int i; | 505 | int i; |
506 | int is_bamboo_touch; | ||
500 | struct input_id sID; | 507 | struct input_id sID; |
501 | unsigned long keys[NBITS(KEY_MAX)]; | 508 | unsigned long keys[NBITS(KEY_MAX)]; |
502 | WacomDevicePtr priv = (WacomDevicePtr)local->private; | 509 | WacomDevicePtr priv = (WacomDevicePtr)local->private; |
@@ -522,11 +529,16 @@ Bool usbWcmInit(LocalDevicePtr local, char* id, float *version) | |||
522 | common->wcmResolY = WacomModelDesc [i].yRes; | 529 | common->wcmResolY = WacomModelDesc [i].yRes; |
523 | } | 530 | } |
524 | 531 | ||
532 | is_bamboo_touch = (common->tablet_id == 0xD0) || | ||
533 | (common->tablet_id == 0xD1) || | ||
534 | (common->tablet_id == 0xD2) || | ||
535 | (common->tablet_id == 0xD3); | ||
536 | |||
525 | if (!common->wcmModel) | 537 | if (!common->wcmModel) |
526 | xf86Msg(X_ERROR, "this model is not supported\n"); | 538 | xf86Msg(X_ERROR, "this model is not supported\n"); |
527 | else if (strstr(common->wcmModel->name, "TabletPC")) | 539 | else if (strstr(common->wcmModel->name, "TabletPC") || is_bamboo_touch) |
528 | { | 540 | { |
529 | if (common->tablet_id != 0x90) | 541 | if (common->tablet_id != 0x90) /* TabletPC 0x90 */ |
530 | { | 542 | { |
531 | /* TouchDefault was off for all devices */ | 543 | /* TouchDefault was off for all devices */ |
532 | /* except when touch is supported */ | 544 | /* except when touch is supported */ |
@@ -539,15 +551,18 @@ Bool usbWcmInit(LocalDevicePtr local, char* id, float *version) | |||
539 | xf86Msg(X_CONFIG, "%s: Touch is enabled \n", local->name); | 551 | xf86Msg(X_CONFIG, "%s: Touch is enabled \n", local->name); |
540 | } | 552 | } |
541 | 553 | ||
542 | /* Tablet PC button applied to the whole tablet. Not just one tool */ | 554 | if (!is_bamboo_touch) |
543 | common->wcmTPCButtonDefault = 1; /* Tablet PC buttons on by default */ | ||
544 | if ( priv->flags & STYLUS_ID ) | ||
545 | { | 555 | { |
546 | common->wcmTPCButton = xf86SetBoolOption(local->options, | 556 | /* Tablet PC button applied to the whole tablet. Not just one tool */ |
547 | "TPCButton", common->wcmTPCButtonDefault); | 557 | common->wcmTPCButtonDefault = 1; /* Tablet PC buttons on by default */ |
548 | if ( common->wcmTPCButton ) | 558 | if ( priv->flags & STYLUS_ID ) |
549 | xf86Msg(X_CONFIG, "%s: Tablet PC buttons are on \n", | 559 | { |
550 | local->name); | 560 | common->wcmTPCButton = xf86SetBoolOption(local->options, |
561 | "TPCButton", common->wcmTPCButtonDefault); | ||
562 | if ( common->wcmTPCButton ) | ||
563 | xf86Msg(X_CONFIG, "%s: Tablet PC buttons are on \n", | ||
564 | local->name); | ||
565 | } | ||
551 | } | 566 | } |
552 | } | 567 | } |
553 | } | 568 | } |