Sorry to be the hold up. I finally had a moment to test this with MT patch and it seems to break gesture support.
I didn't have time to look into it but I'm guessing its related to BTN_TOOL_FINGER=(num_fingers == 1) and not (num_fingers >= 1). Now this doesn't mean below patch is wrong necessarily. It means MT patch would need some if()'s to ignore single touch events when it detects MT events are possible. You've my ack on the patch because its right concept...but it may slightly delay MT patch submission. Chris On Fri, Dec 3, 2010 at 3:15 PM, Ping Cheng <[email protected]> wrote: > Chris, > > Does the patch below compatibility with your MT patchset or not? I > guess Peter, and I, need your ack/nack to move on. > > Thank you. > > Ping > > On Mon, Nov 29, 2010 at 12:41 PM, Ping Cheng <[email protected]> wrote: >> As discussed at linux-input, BTN_TOOL_FINGER should be used to >> report single touch events. Update tool type and event process >> accordingly. >> >> Signed-off-by: Ping Cheng <[email protected]> >> --- >> src/wcmUSB.c | 32 ++++++++++++-------------------- >> src/wcmValidateDevice.c | 18 +++++++++++++----- >> 2 files changed, 25 insertions(+), 25 deletions(-) >> >> diff --git a/src/wcmUSB.c b/src/wcmUSB.c >> index efd4319..30c57a3 100644 >> --- a/src/wcmUSB.c >> +++ b/src/wcmUSB.c >> @@ -935,30 +935,22 @@ static int usbParseKeyEvent(WacomCommonPtr common, >> ds->proximity = (event->value != 0); >> break; >> >> - case BTN_TOOL_FINGER: >> - /* If a real finger report, ignore. */ >> - if (common->wcmProtocolLevel == WCM_PROTOCOL_GENERIC) >> - break; >> - >> - DBG(6, common, >> - "USB Pad detected %x (value=%d)\n", >> - event->code, event->value); >> - ds->device_type = PAD_ID; >> - ds->device_id = PAD_DEVICE_ID; >> - ds->proximity = (event->value != 0); >> + case BTN_TOUCH: >> + /* actual events are processed by BTN_TOOL_* events >> */ >> break; >> >> - case BTN_TOUCH: >> - /* Treat BTN_TOUCH same as BTN_TOOL_DOUBLETAP >> - * for touchpads. >> - * TODO: Tablets that do not use wacom style >> - * multiplexing over a single input device >> - * also can report BTN_TOUCH same as >> - * BTN_TOOL_PEN would be used. We should >> - * allow for that case as well. >> - */ >> + case BTN_TOOL_FINGER: >> + /* A pad tool */ >> if (common->wcmProtocolLevel != WCM_PROTOCOL_GENERIC) >> + { >> + DBG(6, common, >> + "USB Pad detected %x (value=%d)\n", >> + event->code, event->value); >> + ds->device_type = PAD_ID; >> + ds->device_id = PAD_DEVICE_ID; >> + ds->proximity = (event->value != 0); >> break; >> + } >> >> /* fall through */ >> case BTN_TOOL_DOUBLETAP: >> diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c >> index b2ec79e..fd424dc 100644 >> --- a/src/wcmValidateDevice.c >> +++ b/src/wcmValidateDevice.c >> @@ -123,11 +123,11 @@ static struct >> __u16 tool[3]; /* tool array is terminated by 0 */ >> } wcmType [] = >> { >> - { "stylus", { BTN_TOOL_PEN, 0 } }, >> - { "eraser", { BTN_TOOL_RUBBER, 0 } }, >> - { "cursor", { BTN_TOOL_MOUSE, 0 } }, >> - { "touch", { BTN_TOOL_DOUBLETAP, 0 } }, >> - { "pad", { BTN_FORWARD, BTN_0, 0 } } >> + { "stylus", { BTN_TOOL_PEN, 0 } }, >> + { "eraser", { BTN_TOOL_RUBBER, 0 } }, >> + { "cursor", { BTN_TOOL_MOUSE, 0 } }, >> + { "touch", { BTN_TOOL_DOUBLETAP, BTN_TOOL_FINGER, 0 } }, >> + { "pad", { BTN_FORWARD, BTN_0, 0 } } >> }; >> >> /* validate tool type for device/product */ >> @@ -151,6 +151,14 @@ Bool wcmIsAValidType(InputInfoPtr pInfo, const char* >> type) >> if (ISBITSET (common->wcmKeys, >> wcmType[j].tool[k])) >> { >> ret = TRUE; >> + >> + /* non GENERIC devices use >> BTN_TOOL_FINGER for pad */ >> + if (common->wcmProtocolLevel != >> WCM_PROTOCOL_GENERIC) >> + { >> + if (!strcmp(type, "touch") && >> + wcmType[j].tool[k] >> == BTN_TOOL_FINGER) >> + ret = FALSE; >> + } >> } >> else if (!strlen(dsource)) /* an user defined >> type */ >> { >> -- >> 1.7.2.3 >> >> > ------------------------------------------------------------------------------ What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d _______________________________________________ Linuxwacom-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
