dmw-patches

collection of optional patches for dmw
git clone https://git.daat.foo/dmw-patches.git
Log | Files | Refs | README | LICENSE

commit 6a2c3a9d4f3840d2267f95f532d93841ed2846fd
parent 1e7843eaa91265b625847158ce87178e818081a5
Author: cowmonk <cowmonk@based.pt>
Date:   Mon, 23 Nov 2026 12:00:02 -0700

add nonaturalscroll patch

Diffstat:
Anonaturalscroll/README | 14++++++++++++++
Anonaturalscroll/dmw-nonaturalscroll-20261123.patch | 39+++++++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/nonaturalscroll/README b/nonaturalscroll/README @@ -0,0 +1,14 @@ +no natural scroll +================= + +Input is handled much differently in neuswc and wayland in general unlike in X. +Be warned, this is linux only and uses libinput. + +This only affects trackpads or any devices that allow for 2 finger scroll. + +Dependencies +------------ + +Nothing new if you already have installed neuswc/neuwld, this just requires +libinput to be included and linked. + diff --git a/nonaturalscroll/dmw-nonaturalscroll-20261123.patch b/nonaturalscroll/dmw-nonaturalscroll-20261123.patch @@ -0,0 +1,39 @@ +diff --git i/config.mk w/config.mk +index fef9c54..bfc13ba 100644 +--- i/config.mk ++++ w/config.mk +@@ -9,7 +9,7 @@ MANPREFIX = ${PREFIX}/share/man + PKG_CONFIG = pkg-config + SWC_PREFIX != ${PKG_CONFIG} --variable=prefix swc + SWC_XML = ${SWC_PREFIX}/share/swc/swc.xml +-PKGS = swc wld wayland-server wayland-client xkbcommon ++PKGS = swc wld wayland-server wayland-client xkbcommon libinput + + # includes and libs + INCS != ${PKG_CONFIG} --cflags ${PKGS} +diff --git i/dmw.c w/dmw.c +index 45ce7d1..d0a4ee6 100644 +--- i/dmw.c ++++ w/dmw.c +@@ -47,6 +47,7 @@ + #include <wayland-server.h> + #include <wld/wld.h> + #include <xkbcommon/xkbcommon-keysyms.h> ++#include <libinput.h> + + #include "util.h" + +@@ -1120,6 +1121,13 @@ signalhandler(int sig, void *data) + return 0; + } + ++static void ++newdevice(struct libinput_device *device) ++{ ++ if (libinput_device_config_scroll_get_methods(device) & LIBINPUT_CONFIG_SCROLL_2FG) ++ libinput_device_config_scroll_set_natural_scroll_enabled(device, 0); ++} ++ + int + main(int argc, char **argv) + {