On Thu, Jan 20, 2011 at 2:28 PM, Ping Cheng <pingli...@gmail.com> wrote: > On Thu, Jan 20, 2011 at 11:31 AM, Chris Bagwell <ch...@cnpbagwell.com> wrote: >> >> Lets try to solve the ABSOLUTE mode problem and then I think it helps >> solves 1FGT as well. In wcmDeviceTypeKeys(), I was thinking we should >> add something like this: >> >> /* Detect older convention for touchscreen inputs that do not support >> stylus on same input device */ >> if (BTN_TOUCH && !BTN_TOOL_FINGER && !BTN_TOOL_PEN) >> { >> /* This will result in absolute mode for touchscreens */ >> priv->common->tablet_type |= WCM_LCD; >> >> /* Detect touchscreen with 1 touch since it wasn't able to use >> BTN_TOOL_FINGER */ >> if (!BTN_TOOL_DOUBLETAP) >> priv->common->tablet_type |= WCM_1FGT; >> } >> >> What do you think? > > The ugliness will happen in the following code as well: > > ------------------------------------ > static struct > { > const char* type; > __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, BTN_TOOL_FINGER, 0 } }, > { "pad", { BTN_FORWARD, BTN_0, 0 } } > }; >
Oh yeah. Maybe add something like this: if (BTN_TOUCH && !BTN_TOOL_FINGER && !BTN_TOOL_PEN) { /* This will result in absolute mode for touchscreens */ priv->common->tablet_type |= WCM_LCD; /* Needed to generate touch hotplug and detect 1FGT */ SET_BIT(wcmKeys, BTN_TOOL_FINGER); } ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel