You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-misc/ckb/files/ckb-0.4.4-libinput-1.2.0.patch

30 lines
1.2 KiB

From dc4dc54c5ebac7e4b455d8df35076fc044a581a7 Mon Sep 17 00:00:00 2001
From: Tasos Sahanidis <tasos@tasossah.com>
Date: Mon, 20 Sep 2021 14:48:18 +0300
Subject: [PATCH] Don't enable unneeded axes in mouse device
Specifically, we used to enable HI_RES wheel events without ever
sending any. This breaks scrolling in latest libinput as it expects
us to actually send HI_RES events.
---
src/daemon/input_linux.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/daemon/input_linux.c b/src/daemon/input_linux.c
index 68cc0ebb..a9ac8c8e 100644
--- a/src/daemon/input_linux.c
+++ b/src/daemon/input_linux.c
@@ -25,8 +25,10 @@ int uinputopen(struct uinput_user_dev* indev, int mouse){
ioctl(fd, UI_SET_KEYBIT, i);
// Enable mouse axes
ioctl(fd, UI_SET_EVBIT, EV_REL);
- for(int i = 0; i < REL_CNT; i++)
- ioctl(fd, UI_SET_RELBIT, i);
+ ioctl(fd, UI_SET_RELBIT, REL_X);
+ ioctl(fd, UI_SET_RELBIT, REL_Y);
+ ioctl(fd, UI_SET_RELBIT, REL_WHEEL);
+ ioctl(fd, UI_SET_RELBIT, REL_HWHEEL);
} else {
// Enable common keyboard keys
for(int i = KEY_ESC; i <= KEY_MEDIA; i++)