On Thu, Oct 27, 2011 at 08:47:53AM -0500, Chris Bagwell wrote:
> On Wed, Oct 26, 2011 at 11:25 PM, Peter Hutterer
> <peter.hutte...@who-t.net> wrote:
> > On Mon, Oct 24, 2011 at 04:02:46PM -0700, Ping Cheng wrote:
> >> On Sun, Oct 23, 2011 at 8:22 PM, Peter Hutterer
> >> >> 1) My device advertises Pressure support with range of 0-4096 but
> >> >> never sends anything.  If I was an application writer (I'm not, BTW,
> >> >> so could be wrong :-) ), I would make assumptions when I saw that
> >> >> valuator declared.  I'd stop looking for left click and instead start
> >> >> looking for some non-zero pressure value as left click.
> >> >
> >> > that sounds like a kernel bug. the device shouldn't advertise the axis
> >> > if it doesn't use it (possibly quirked out if the HW is at fault)
> >>
> >> It is not a kernel driver issue. It is an issue in wcmInitAxes
> >> (xf86Wacom.c). We did not check if the axis is defined or not before
> >> calling InitValuatorAxisStruct.
> >
> > oh. so it's not the kernel that advertises the pressure axis then?
> > in that case, we should be able to fix it "easily"
> 
> Yeah, pretty easy.  I've wanted to do this for a while but I've just
> not been able to find much spare time lately.
> 
> The 1st change is pretty easy:
> 
> We hard code in several places that valuator[2] is pressure and
> valuator[5] is a wheel (and other axis as well).  Easiest solution in
> code is to not init that pressure axis and see how X server reacts to
> wholes in valuator ranges.  Does it ignore them during Posts?  If not
> then we need to compact the valuator inits and then store a valuator
> index when filling in these structures.

the server can handle holes in valuator ranges for events, but not for
axis initialisation. So you are required to have a continuous valuator range
but once you have that, you can post an event that contains data only for
valuators 1,3 and 7. So we definitely need to squash the valuators together.

> The next part is to verify apps don't get cranky when they see either
> holes in valuators defined or if someone hard code an assumption that
> tablets will always declare, for example, a wheel valuator.  The later
> I would assume is an application bug but not sure about the former.

Only XI2 allows sending events with missing valuators in between, so those
apps should already handle those properly (I'm not sure off-hand what we do
with XI1 events in that case, I think we fill in from last.valuators).
 
Cheers,
  Peter

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to