GNOME Bugzilla – Bug 775756
Add tap and drag
Last modified: 2017-01-05 15:28:58 UTC
Created attachment 341552 [details] [review] Suggestion of code The problem is that you can't disable dragging when tap-to-click is enabled. For people who have a sensitive touchpad and who like tap-to-click option, dragging is launched even when you don't want it : for example, when you select a folder, most of the time the folder is dragging whereas just selected or when you want to select some lines of a text file, several lines are moved as a cut-paste which is not expected and erase datas. To fix it, you need to have the possibility to desactivate the drag option when you use tap-to-click and gsetting schema must be modify to have the tap-and-drag option.
tap-and-drag is already in specification of libinput but not in mutter, gnome-control-center nor gsettings-desktop-deamons. So, 3 commits are necessary to let the possibility to people to choose tap-and-drag or not. That's why I opened 3 bugs for 3 modules of gnome : mutter: https://bugzilla.gnome.org/show_bug.cgi?id=775755 gsettings-desktop-deamons: https://bugzilla.gnome.org/show_bug.cgi?id=775756 gnome-control-center: https://bugzilla.gnome.org/show_bug.cgi?id=775324
Created attachment 341597 [details] [review] Suggestion of code 2 summary and description correction from "suggestion of code 440e8404323eeaf5fc7696ac36d63f137beeeccc"
The idea is fine, but can't the hysteresis be fixed in libinput directly, so we don't need the fix (yet)?
Tap-and-drag is already in libinput (https://wayland.freedesktop.org/libinput/doc/latest/tapping.html) You can use this option with Xorg by managing the driver xf86-input-libinput but you can't use tap-and-drag in wayland. That's why I want to add it to wayland/mutter and do this dependance.
I think what Bastien is referring to is that if you start drag events when you don't intend to, that's a bug in libinput and should be fixed there. Because this option isn't needed if your touchpad would work correctly. So let's see if we can fix this in libinput first.
OK, I haven't thought about it because I have a macbook and on mac os I disabled drag for the same reason. So, I will add a libinput bug but, in my opinion, the possibility to enable/disable drag make still sense.
I go to libinput bugzilla and found this https://bugs.freedesktop.org/show_bug.cgi?id=93502 . Cyril B. describes exactly my issue and this bug was fixed by adding the option tap-and-drag to libinput by you (Peter Hutterer) and I believe it's still a good way to do. So, Enable/Disable tap-and-drag seems necessary in wayland.
This is a different use-case. In your case it sounds like the result of a bug, in Cyril's case it was a side-effect of the usage pattern. So yes, an option may be necessary down the road but not for your issue, I think.
(In reply to Peter Hutterer from comment #8) > This is a different use-case. In your case it sounds like the result of a > bug, in Cyril's case it was a side-effect of the usage pattern. So yes, an > option may be necessary down the road but not for your issue, I think. freeroot, can you please file a bug against libinput about this then? I'll leave the patches here in case we want to commit those.
Review of attachment 341597 [details] [review]: Marking as needs-work to get it off the review list. We'll need respin it when we actually have a need for it. The commit message would also need some work, including adding the bug's URL. ::: schemas/org.gnome.desktop.peripherals.gschema.xml.in @@ +24,3 @@ <description>Set this to TRUE to be able to send mouse clicks by tapping on the touchpad.</description> </key> + <key name="tap-and-drag" type="b"> The key name and the description need work. I'd stick closer to the vocabulary used in libinput. @@ +27,3 @@ + <default>true</default> + <summary>Enable mouse drags with touchpad</summary> + <description>Set this to TRUE to be able to send mouse drags by tapping on and holding the touchpad.</description> "mouse drags"?
(In reply to Peter Hutterer from comment #8) > This is a different use-case. In your case it sounds like the result of a > bug, in Cyril's case it was a side-effect of the usage pattern. So yes, an > option may be necessary down the road but not for your issue, I think. (In reply to Bastien Nocera from comment #9) > (In reply to Peter Hutterer from comment #8) > > This is a different use-case. In your case it sounds like the result of a > > bug, in Cyril's case it was a side-effect of the usage pattern. So yes, an > > option may be necessary down the road but not for your issue, I think. > > freeroot, can you please file a bug against libinput about this then? > > I'll leave the patches here in case we want to commit those. I think it's my bad english that makes you feel/believe it's a different use-case of Cyril's case. You know that tap-and-drag in not in Wayland and you tell me to not add it while Cyril's case is not managed now in Wayland. If you prefer, fix the Cyril's case by adding tap-and-drag in Wayland, in all case. I can add a libinput bug in parallele to alert about it but I believe it were just create a duplicate bug.
(In reply to Bastien Nocera from comment #10) > Review of attachment 341597 [details] [review] [review]: > > Marking as needs-work to get it off the review list. We'll need respin it > when we actually have a need for it. > > The commit message would also need some work, including adding the bug's URL. > > ::: schemas/org.gnome.desktop.peripherals.gschema.xml.in > @@ +24,3 @@ > <description>Set this to TRUE to be able to send mouse clicks by > tapping on the touchpad.</description> > </key> > + <key name="tap-and-drag" type="b"> > > The key name and the description need work. I'd stick closer to the > vocabulary used in libinput. > > @@ +27,3 @@ > + <default>true</default> > + <summary>Enable mouse drags with touchpad</summary> > + <description>Set this to TRUE to be able to send mouse drags by > tapping on and holding the touchpad.</description> > > "mouse drags"? The key name tap-and-drag is exactly the name used in libinput, that's why I used it but I will looking for a closer summary and description to libinput vocabulary. "mouse drags" can't be used because it's only drags done from a tap.
Created attachment 341678 [details] [review] Suggestion of code 3 Improve description Improve commit message Add bug's url to commit message
Finally, I added a bug in libinput for my issue. https://bugs.freedesktop.org/show_bug.cgi?id=99044 . I hope I will can use my touchpad soon. I will report here conclusions of the bug in libinput.
update: based on the description in the bug in comment #14 this isn't a bug in libinput, it's simply that the reporter doesn't want to wait until after the tap-drag timeout to move the pointer. So this does indeed require the option be exposed by gnome.
Bastien Nocera, is my patch good now ?
Created attachment 342967 [details] [review] schemas: Add "tap-and-drag" for touchpads On some sensitive touchpads, tap-and-drag can be annoying, so we need a way to disable it.
Attachment 342967 [details] pushed as 23f96de - schemas: Add "tap-and-drag" for touchpads