12 Replies to “Linux Touchpad like Macbook Update: Touchpad gestures land to Qt, Gimp and X server”

  1. Hi, regarding additional ideas: in the past I worked on an MR for GTK, which makes continuous touchpad interaction – such as scrolling, zooming etc – smooth rather than jittery. I no longer have the time to work on that, but you might find it an interesting topic to upstream. The MRs are basically done, but might have suffered from some bit rot.

    The MRs are here:
    https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1117
    https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1562

    At the time, the GTK developers weren’t enthusiastic about merging the code in its current form. They might be more open if the design was changed a bit. An alternative approach is to get a similar MR merged into, say, libinput and so work at the compositor rather than at the toolkit level.

    Please feel free to contact me if you need background etc – you can simply mention me on one of the MRs mentioned above (@yarivb).

  2. Eh, seems that I’ve already mentioned my PRs in a comment on a previous blog post. Please feel free to delete my comments here if you feel that they are redundant.

  3. Gestures are cool and all, but what would really move the needle is to having scrolling and two-finger clicking work like on a mac.

  4. First off, thanks for all the work and progress that have been done!
    In my opinion, the macOS touchpad gesture that really lacks from Linux is two finger swipe to go back (overscroll history navigation). While it works PERFECT in Gnome Web (Epiphany), using WebKit’s built-in functions and mimicking its animations, other popular web browsers that are more widely used don’t feature that kind of perfection. I managed to get the basic Chrome swipe back gesture (with the blue arrow) on an X session, but it doesn’t work well. I tried configuring such a thing in Firefox’s about: config “browser.gesture.swipe” but that didn’t work either.
    On macOS Safari and Gnome Web, a swipe back animates flipping a page in a book and it looks absolutely stunning. The developer who’s responsible for making the whole thing working on Gnome Web, have published a 3 parted blog post with all the relevant information of how it has been done. If you find the time and resources, I’d really appreciate it if you could integrate this functionality into Firefox (or any FOSS Chromium based browser).
    Btw, Gnome Web gestures work in both Xorg and Wayland, and even using a legacy touchpad because IT DOESN’T USE ANY GESTURE EVENTS! It uses scroll events instead. More information here: https://blogs.gnome.org/alexm/2019/09/13/gnome-and-gestures-part-1-webkitgtk
    (Note there are 3 parts to this blog)

    Thanks again for all your and your team’s hard work, it’s appreciated 🙂

  5. The gestures I miss the most from my mac are dragging with 3 fingers and swiping back and forward between pages with 2 fingers. Would really love to see this make its way to Linux!

    Amazing progress! Keep up the amazing work!

  6. Have you looked at mouse acceleration curves, touchpad scrolling speed, and touch response latency? For example, on Firefox with wayland (on hidpi, not sure if relevant), touchpad scrolling for me is about 1.5x too fast. GTK’s scrolling is also pretty fast relative to the distance my fingers move. I would pay to have this fixed.

  7. For KDE the gesture support seem to be in progress here https://invent.kde.org/plasma/kwin/-/merge_requests/1059, it’d be great if you guys collaborated with KDE developers to implement. As far I am aware, the merge request doesn’t involve any use of the Qt APIs and gesture logic is handled internally so maybe we might end up with a subpar implementation from a technical standpoint.

  8. First I would like to thank you for your tremendeous effort to improve the Linux touchpad experience. Recently I tried out libinput on Linux and I must say, that I’m impressed, what can be done with the touchpad driver today. Unfortunately I must also say, that MacOS is still much superior to the Linux and Windows touchpad experience in many ways.

    The Hardware I compared (ArchLinux+Gnome40+Wayland+libinput, Windows 10, macOS Catalina):
    – Lenovo Thinkpad T460s
    – Lenovo Thinkpad T480s with replaced X1E glass touchpad (see https://www.reddit.com/r/thinkpad/comments/j0mrh5/t480_with_x1e_glass_touchpad_so_much_better/)
    – MacBook Early 2015 (MacBookPro12,1).

    Here are some of my thoughts:

    # Hardware
    The first thing I’m still trying to find out is, how much hardware plays a role. Therefore I plan to:
    – Run Linux on my MacBook
    – Run MacOS on my T460s (https://github.com/simprecicchiani/Thinkpad-T460s-macOS-OpenCore)
    – Compare the touchpad experience regarding hardware

    My guess would be, that hardware might play a small role, but that it is mainly the driver / software implementation, that makes the difference.

    # Accuracy
    The accuracy of the touchpad on MacOS is by far the best, especially on slow / short moves. Even long tinkering sessions trying to find the best settings for libinput did not make the T460s / T480s touchpad come close to the MacOS expierience. Windows 10 feels slightly better than Linux to me, but is still far behind compared to macOS.

    # Kinetic scrolling / Inertial Scrolling
    Kinetic scrolling means, that scrolling won’t stop immedeately after lifting your fingers of the touchpad, but keeps going a while dependent on how fast you accellerated. Repeating the motion accellerates, while just tapping on the touchpad stops the ongoing movement.

    In my opinion, this is a very very important feature to immitate the touchpad feel of macOS. Unfortunately libinput documentation says, that this behaviour will not be implemented in the libinput/driver, but has to be implemented in EVERY Application (https://wayland.freedesktop.org/libinput/doc/latest/faqs.html#kinetic-scrolling-does-not-work). While this might be technically a valid decision (I’m not an expert), I think it might be a wrong one. Putting the implementation to the app developers will pretty likely lead to inconsistencies, misbehaviours and bugs – especially looking at cross platform UI solutions like JavaFX, AvaloniaUI or Electron.

    # Configuration
    Libinput can be configured with a file on X11, but on Wayland, you have to rely on the Compositor. Gnome has a GUI to tweak some settings, KDE also has some of the options but all in all I think configuration could be improved to be more generic.

    If you like to hear my opinion about new developments or looking for at tester that can compare Windows, Linux AND macOS, feel free to reach out.

    Best regards,
    sandreas

  9. How do I get the gestures to work on a Elantech touchpad? I installed I installed libinput-gestures to see if libinput is reading gestures. But it only reads 2 fingers. Another progam, syngestures, which doesn’t use libinput, is able to read 3 finger swipes. So I don’t know what’s happening, I thought libinput is generic and can read input from any touchpad?

  10. Hi Bill, any plans for an update on this effort soon? Really appreciate all the hard work so far from you and Povilas!

Leave a Reply

Your email address will not be published. Required fields are marked *