On Thu, Jan 20, 2011 at 12:12 PM, Ping Cheng <pingli...@gmail.com> wrote: > On Wed, Jan 19, 2011 at 12:46 PM, Chris Bagwell <ch...@cnpbagwell.com> wrote: >> On Wed, Jan 19, 2011 at 12:41 PM, Ping Cheng <pingli...@gmail.com> wrote: >>> On Tue, Jan 18, 2011 at 6:19 PM, Chris Bagwell <ch...@cnpbagwell.com> wrote: >>>> >>>>>> Is there driver your interested in? Its difficult to talk in abstract. >>>>> >>>>> I'm moving the existing _TAP_ based USB TPC to _MT_ based format. >>>>> That's why I don't want to reuse _TAP_ again. >>>> >>>> OK. Thanks. That clears up some things. So this will be 2 input >>>> devices: 1) pen+eraser and 2) touchscreen (no pad buttons). >>>> >>>> For touchscreen device, it would be very much to your advantage to >>>> look just like pre-existing touchscreens. So I agree that means no >>>> DOUBLETAP and for that matter no BTN_TOOL_FINGER from kernel side. >>>> The goal would be for xf86-input-evdev and xf86-input-wacom to both >>>> support equally. >>> >>> I had to sleep on this email to "dream" through :). >>> >>> I think we need BTN_TOOL_FINGER to report single touch events. That's >>> what we have discussed at LKML earlier for wacom_w8001. Dimitry told >>> us to use BTN_TOOL_FINGER for ST. And you agreed. >> >> The agreement wasn't in isolation. It was to use BTN_TOOL_FINGER and >> a new ioctl() so user land can query to see the FINGER device is a >> touchscreen. Are you adding support for that ioctl? >> >> If not then I recommend sticking with pre-existing standard and not >> sending BTN_TOOL_FINGER in TPC kernel driver so that xf86-input-wacom >> has enough info to know its an Absolute touchscreen and not relative >> touchpad like it assumes for Bamboo today. >> >> Please see hid_ntrig.c. It and Wacom Tablet PC both present 2 input >> devices with same feature set on both. >> >> What it does on its touchscreen input is NOT declare BTN_TOOL_FINGER >> so applications can tell its an absolute mode touchscreen. It does >> declare BTN_TOOL_DOUBLETAP though and sends it during 2-finger touch >> time periods (no affect on reported ABS_X/ABS_Y values which always >> track first touch). It also sends MT events. >> >> This plays very nice with xf86-input-evdev and also should play very, >> very nice with current git xf86-input-wacom (correctly hotplugs, >> correctly sets WCM_2FGT, etc). > > I removed BTN_TOOL_FINGER from the kernel dirver. But I am facing an > issue for ST device. Without BTN_TOOL_FINGER, xf86-input-wacom does > think we have a touch device. So, the solution works for 2FGT devices. > But not for 1FGT devices. At least not without code change. I gathered > the following options: > > 1. set BTN_TOOL_DOUBLETAP for 1FGT as well. That's not a solution I > like since the device only supports one finger; > > 2. set BTN_TOOL_FINGER for 1FGT. It confuses xf86-input-evdev, which > you don't like; > > 3. update the code. The code would be ugly. > > Do you have other suggestions? Thank you. > > Ping >
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? Its a little ugly but I guess thats kernel's fault since its their convention. When that new ioctl comes around, we can technically add BTN_TOOL_FINGER back in on kernel side and base WCM_LCD on ioctl() value somehow. We can do it both above "old" way and new ioctl() way to be backwards compatible. wacom_w8001.c should work in this way as well. With its interface, 1 touch devices will correctly set 1FGT because it sets BTN_TOOL_FINGER but not BTN_TOOL_DOUBELTAP. It will incorrectly default to relative mode until we support that new ioctl() in xf86-input-wacom. Your call if you want to skip straight to new BTN_TOOL_FINGER+ioctl() approach but I think it would be nice to be able to route hid_ntrig's touchscreen device to xf86-input-wacom (so need something like above for its sake). Chris ------------------------------------------------------------------------------ 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