[PATCH xf86-input-synaptics 10/12] Add right button area property
Peter Hutterer
peter.hutterer at who-t.net
Wed Feb 22 22:06:22 PST 2012
On Wed, Feb 22, 2012 at 08:30:31PM -0800, Chase Douglas wrote:
> On 02/22/2012 07:58 PM, Peter Hutterer wrote:
> >On Thu, Feb 09, 2012 at 06:53:04PM -0800, Chase Douglas wrote:
> >>Some clickpad devices have a right button area painted on them. Set this
> >>property to the area of the right button to enable right click actions
> >>when tapping or clicking in this area.
> >>
> >>Signed-off-by: Chase Douglas<chase.douglas at canonical.com>
> >>---
> >> include/synaptics-properties.h | 3 ++
> >> man/synaptics.man | 45 ++++++++++++++++++++++++++++++++++++++++
> >> src/properties.c | 21 ++++++++++++++++++
> >> src/synaptics.c | 28 ++++++++++++++++++++++++-
> >> src/synapticsstr.h | 1 +
> >> 5 files changed, 97 insertions(+), 1 deletions(-)
> >>
> >>diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h
> >>index 712a10b..0a253b2 100644
> >>--- a/include/synaptics-properties.h
> >>+++ b/include/synaptics-properties.h
> >>@@ -161,6 +161,9 @@
> >> /* 32 bit, 4 values, left, right, top, bottom */
> >> #define SYNAPTICS_PROP_AREA "Synaptics Area"
> >>
> >>+/* 32 bit, 4 values, left, right, top, buttom */
> >>+#define SYNAPTICS_PROP_RIGHTBUTTON_AREA "Synaptics Right Button Area"
> >>+
> >
> >AFAIK, some devices have a middle button painted on too, so this needs to be
> >more flexible.
>
> Are you sure? I've never seen any.
I'm not sure anymore now :)
> I was thinking that we could add middle button support later by
> providing SYNAPTICS_PROP_MIDDLEBUTTON_AREA if we needed to.
>
> I'm not a big fan of cramming a ton of somewhat unrelated data into
> the same device property. As an example, I think the tap action
> property should have been split up as "tap action areas" and "tap
> action count" or something like that.
for the archives: we had an IRC discussion about this, result was to add one
"Synaptics Soft Button Areas" property containing all areas for the buttons.
> >How about a property that takes sets of 4 coordinates for
> >each button, with the driver deciding whether it's the right button or right
> >+ middle based on the number of values in the property?
>
> Can properties have variable numbers of coordinates? I'm unaware of
> any properties like this today. I think it would be less
> discoverable as well, and is unrelated enough to warrant another
> property. We aren't hurting for property value space are we?
properties can have 0 or more values, and how many values we allow is
largely up to the driver. Most properties have code in the form of
if (prop->size != 4)
return BadMatch;
but that's the only thing stopping properties from having arbitrary numbers
of values.
Cheers,
Peter
More information about the xorg-devel
mailing list