Implementing right click and middle click drag

Sagar Tewari iaansagar at
Sat Jul 14 09:39:40 UTC 2018


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

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> wrote:

> Thanks, I'll get myself working on it.
> On Thu, Jul 12, 2018, 08:19 Peter Hutterer <peter.hutterer at>
> 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:
>> >
>> >
>> > 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: touchpad-tap-state-machine (4).svg
Type: image/svg+xml
Size: 205580 bytes
Desc: not available
URL: <>

More information about the wayland-devel mailing list