Skip to content

Instantly share code, notes, and snippets.

@craigcabrey
Created September 25, 2025 02:45
Show Gist options
  • Save craigcabrey/e64a83cc11628c995b401019959c7be1 to your computer and use it in GitHub Desktop.
Save craigcabrey/e64a83cc11628c995b401019959c7be1 to your computer and use it in GitHub Desktop.
diff --git a/src/evdev-mt-touchpad-gestures.c b/src/evdev-mt-touchpad-gestures.c
index 72bc6f2..d0c29dd 100644
--- a/src/evdev-mt-touchpad-gestures.c
+++ b/src/evdev-mt-touchpad-gestures.c
@@ -2135,7 +2135,7 @@ tp_3fg_drag_get_enabled(struct libinput_device *device)
static enum libinput_config_3fg_drag_state
tp_3fg_drag_default(struct tp_dispatch *tp)
{
- return LIBINPUT_CONFIG_3FG_DRAG_DISABLED;
+ return LIBINPUT_CONFIG_3FG_DRAG_ENABLED_3FG;
}
static enum libinput_config_3fg_drag_state

Three finger drag enabled by default

This modifies Fedora's libinput package to enable three finger drag by default. You need to have a build environment setup (I recommend a toolbox container). Start by downloading the two patches in this gist.

$ fedpkg clone --branch f43 --anonymous libinput
Cloning into 'libinput'...
remote: Enumerating objects: 1530, done.
remote: Counting objects: 100% (1530/1530), done.
remote: Compressing objects: 100% (1501/1501), done.
remote: Total 1530 (delta 690), reused 57 (delta 10), pack-reused 0
Receiving objects: 100% (1530/1530), 466.84 KiB | 1.24 MiB/s, done.
Resolving deltas: 100% (690/690), done.
$ cd libinput
$ git apply < path/to/libinput.spec.patch
$ mv path/to/3fg.patch .
$ fedpkg local
[...]
$ sudo dnf install <arch>/libinput-1.29.1-2.fc43.<arch>.rpm <arch>/libinput-utils-1.29.1-2.fc43.<arch>.rpm
$ reboot
$ # profit!
diff --git a/libinput.spec b/libinput.spec
index 1ca07c6..c157287 100644
--- a/libinput.spec
+++ b/libinput.spec
@@ -5,7 +5,7 @@
Name: libinput
Version: 1.29.1
-Release: 1%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
+Release: 2%{?gitdate:.%{gitdate}git%{gitversion}}%{?dist}
Summary: Input device library
# SPDX
@@ -58,6 +58,7 @@ The %{name}-utils package contains tools to debug hardware and analyze
%package test
Summary: libinput integration test suite
Requires: %{name}%{?_isa} = %{version}-%{release}
+Patch0: 3fg.patch
%description test
The %{name}-test package contains the libinput test suite. It is not
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment