Add an option to enable 3fg/4fg drag gesture #2594
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a setting to enable the new 3-finger/4-finger drag setting on libinput. See https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1042 and https://who-t.blogspot.com/2025/02/libinput-and-3-finger-dragging.html for explanations and details about this feature (to summarize: this is an alternative to the tap-and-drag gesture).
This feature is currently on the main branch of libinput and will be available on the future 1.28 release. On Wayfire, the code to enable this feature is compiled only if the functions are implemented on the installed libinput version. To achieve that goal, I use a solution inspired from what is done on xf86-input-libinput project: in the meson file, I check if the function exists and then set (or not) a macro that is used to activate the code. Another solution would be to wait the release of libinput 1.28 and then require the minimum version of libinput is 1.28 (
libinput = dependency('libinput', version: '>=1.28.0'
).If the feature is not present on the installed libinput version, this new setting is nevertheless added to the config. But its activation does nothing.
By default, the setting disables this feature to not change the current behavior.