On Sun, Jan 08, 2012 at 12:16:57AM -0800, Ping Cheng wrote:
> On Saturday, January 7, 2012, Chris Bagwell <ch...@cnpbagwell.com> wrote:
> > What was the usecase for this again?
> 
> The goal was to disable touch events when there are more than one touch on
> the tablet while wcmMT is off. That is, we only report touch events when
> there is only one touch on the tablet.

what's the use-case for that though? You're essentially saying you want to
disable multitouch but still report one touch? At what point is this useful?

The server (1.12) only does pointer emulation for one touchpoint anyway and
any client that actually handles touch events is rather expected to deal
with multiple ones. Same with the in-driver touch support. 

Cheers,
  Peter

> As I mentioned in patch 1/2, this support was originated on kernel 2.6.35
> and  the kernel code was a bit different. Once I read your comments, I
> realized that the patch is not doing what it supposed to do.
> 
> I'll update the patch and the man page to reflect the goal.
> 
> >  I probably have minor comments
> > on code but it would help if I knew usecase so I don't suggest
> > something that would break it.
> >
> > Is there some case were MT events are causing invalid behaviour?
> >
> > Also, there is some commented out debug code that should be removed
> > before committing.
> 
> Sorry, that was a last minute change on Friday before I rushed out of the
> office....
> 
> Ping
> >
> > Chris
> >
> > On Fri, Jan 6, 2012 at 7:57 PM, Ping Cheng <pingli...@gmail.com> wrote:
> >> This property enables/disables multi-touch events on a multi-touch
> >> device. When MT is disabled, the device behaves like a single
> >> touch device. The corresponding xorg.conf option is also added.
> >>
> >> Signed-off-by: Ping Cheng <pi...@wacom.com>
> >> ---
> >>  include/wacom-properties.h |    3 +++
> >>  man/wacom.man              |    3 +++
> >>  src/wcmCommon.c            |   19 ++++++++++++++++---
> >>  src/wcmUSB.c               |    9 ++++++---
> >>  src/wcmValidateDevice.c    |    4 ++++
> >>  src/wcmXCommand.c          |   18 +++++++++++++++++-
> >>  src/xf86WacomDefs.h        |    3 ++-
> >>  tools/xsetwacom.c          |   10 ++++++++++
> >>  8 files changed, 61 insertions(+), 8 deletions(-)
> >>
> >> diff --git a/include/wacom-properties.h b/include/wacom-properties.h
> >> index 0bb84b1..aa43d4d 100644
> >> --- a/include/wacom-properties.h
> >> +++ b/include/wacom-properties.h
> >> @@ -77,6 +77,9 @@
> >>  #define WACOM_PROP_TOUCH "Wacom Enable Touch"
> >>
> >>  /* 8 bit, 1 values */
> >> +#define WACOM_PROP_ENABLE_MT "Wacom Enable Multi-Touch"
> >> +
> >> +/* 8 bit, 1 values */
> >>  #define WACOM_PROP_ENABLE_GESTURE "Wacom Enable Touch Gesture"
> >>
> >>  /* 32 bit, 3 values, zoom, rotate, tap parameters */
> >> diff --git a/man/wacom.man b/man/wacom.man
> >> index 3d4a143..04d84a7 100644
> >> --- a/man/wacom.man
> >> +++ b/man/wacom.man
> >> @@ -225,6 +225,9 @@ sets the pressure threshold used to generate a
> button 1 events of stylus.
> >>  The threshold applies to the normalised pressure range of [0..2048].
> >>  The default is 27.
> >>  .TP 4
> >> +.B Option \fI"Multi-Touch"\fP \fI"bool"\fP
> >> +Enable or disable multi-touch events on the device. Default: on.
> >> +.TP 4
> >>  .B Option \fI"Gesture"\fP \fI"bool"\fP
> >>  Enable or disable gesture support on the device. Default: off unless the
> >>  tablet supports multi-touch.
> >> diff --git a/src/wcmCommon.c b/src/wcmCommon.c
> >> index 0f041e3..cf1e5c2 100644
> >> --- a/src/wcmCommon.c
> >> +++ b/src/wcmCommon.c
> >> @@ -1,6 +1,6 @@
> >>  /*
> >>  * Copyright 1995-2002 by Frederic Lepied, France. <lep...@xfree86.org>
> >> - * Copyright 2002-2010 by Ping Cheng, Wacom. <pi...@wacom.com>
> >> + * Copyright 2002-2012 by Ping Cheng, Wacom. <pi...@wacom.com>
> >>  *
> >>  * This program is free software; you can redistribute it and/or
> >>  * modify it under the terms of the GNU General Public License
> >> @@ -1009,8 +1009,21 @@ void wcmEvent(WacomCommonPtr common, unsigned int
> channel,
> >>        pChannel->valid.state = ds; /*save last raw sample */
> >>        if (pChannel->nSamples < common->wcmRawSample)
> ++pChannel->nSamples;
> >>
> >> -       if ((ds.device_type == TOUCH_ID) && common->wcmTouch)
> >> -               wcmGestureFilter(priv, channel);
> >> +       if ((ds.device_type == TOUCH_ID) && (common->wcmTouch))
> >> +       {
> >> +               /* enable left click for single touch touchscreen */
> >> +/*             if ((!common->wcmMT ||
> >> +                       TabletSetFeature(priv->common, WCM_1FGT)) &&
> >> +                       TabletHasFeature(priv->common, WCM_LCD))
> >> +               {
> >> +                       if (ds.proximity)
> >> +                               pChannel->valid.state.buttons |= 1;
> >> +               >

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to