Implementing right click and middle click drag

Peter Hutterer peter.hutterer at who-t.net
Wed Jul 18 07:51:16 UTC 2018


On Sat, Jul 14, 2018 at 05:46:34PM +0530, Sagar Tewari wrote:
> Hi,
> 
> I'm adding states to implement the above changes and have a query regarding
> the 'tap_event' enum. What do the enum values 'TAP_EVENT_THUMB,
> TAP_EVENT_PALM' mean.
> Do they mean that a thumb or palm has been placed on the touchpad, or that
> one of the touch locations is actually a thumb or palm? If latter is the
> case, what does the value 'TAP_EVENT_PALM_UP' mean?

THUMB means "finger has been detected as thumb" which usually means it
doesn't count towards tapping anymore. In the current implementation, a
thumb is a stronger type of ignoring than palm and often resets the state.
Mostly for historical reason because tapping with a thumb on the pad is less
common (or at least less supported).

PALM means "finger has been detected as palm", PALM_UP means that finger has
been released. In both cases we need to reset the tap state to a previous
state because we do support tapping with a palm resting on the touchpad.
Also, unlike thumbs palms can be triggered at any time - a touch is
generally labelled as thumb very early on in the sequence.

Cheers,
   Peter

> 
> On Sat, Jul 14, 2018 at 3:09 PM Sagar Tewari <iaansagar at gmail.com> wrote:
> 
> > Hi,
> >
> > This is the proposed design of state machine for implementing right click
> > drag as double tap followed by a single tap. I intend to implement the
> > middle tap drag in a similar way. The new stuff in inside the dashed
> > boundaries. This is the intended behaviour:
> >
> > 1. A double tap followed by a single tap and move will act as a right
> > click drag.
> >
> > 2. If drag lock is enabled, the user will have to tap to end the right
> > click drag.
> >
> > Please review it and let me know of any required modifications.
> >
> >
> > On Thu, Jul 12, 2018 at 8:22 AM Sagar Tewari <iaansagar at gmail.com> wrote:
> >
> >> Thanks, I'll get myself working on it.
> >>
> >> On Thu, Jul 12, 2018, 08:19 Peter Hutterer <peter.hutterer at who-t.net>
> >> wrote:
> >>
> >>> On Tue, Jul 10, 2018 at 01:06:17PM +0530, Sagar Tewari wrote:
> >>> > I would like to work on implementing right and middle click drag as
> >>> > two/three finger tap followed by a single tap drag, the way it works in
> >>> > synaptics driver. I found that this topic has been discussed
> >>> previously:
> >>> >
> >>> https://lists.freedesktop.org/archives/wayland-devel/2017-September/034926.html
> >>> >
> >>> > But this was the single main on that topic in the archives.
> >>> >
> >>> > To Peter Hutterer, where can I find the patch being discussed in that
> >>> mail?
> >>> > Would it be better to start from scratch since the patch was apparantly
> >>> > flawed?
> >>>
> >>> I've forwarded the attachments from that thread to you off-list.
> >>>
> >>> Basically, that patch was incomplete and didn't handle some states and
> >>> transitions. It also wasn't documented clearly, in that it didn't explain
> >>> what it *intended* to do. For hairy stuff like this, knowing what the
> >>> intention was is more important than the code so we know what is a bug
> >>> and
> >>> what isn't.
> >>>
> >>> Note that the state machine is the main source of information here, the
> >>> actual tapping code is just a bunch of switch statements based on the
> >>> state.
> >>>
> >>> Cheers,
> >>>    Peter
> >>>
> >>
> >
> > --
> > Best Regards
> > Sagar Tewari
> >
> 
> 
> -- 
> Best Regards
> Sagar Tewari


More information about the wayland-devel mailing list