aboutsummaryrefslogtreecommitdiff
path: root/backend/x11
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2023-01-16 14:19:44 +0300
committerKirill Primak <vyivel@eclair.cafe>2023-01-16 14:19:44 +0300
commit9c7db7124edea044a89c5872742f8bd09adb1140 (patch)
tree9eb27a3c1f5327a613a90f18ad5c95cf2f71c191 /backend/x11
parent5f264a7d6c8af27d41ff440c05262b022c055593 (diff)
backend/x11: fix delta_discrete value
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3563
Diffstat (limited to 'backend/x11')
-rw-r--r--backend/x11/input_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/x11/input_device.c b/backend/x11/input_device.c
index 603316f1..f2966a22 100644
--- a/backend/x11/input_device.c
+++ b/backend/x11/input_device.c
@@ -47,9 +47,9 @@ static void send_axis_event(struct wlr_x11_output *output, int32_t delta,
.time_msec = time,
.source = WLR_AXIS_SOURCE_WHEEL,
.orientation = WLR_AXIS_ORIENTATION_VERTICAL,
- // 15 is a typical value libinput sends for one scroll
+ // Most mice use a 15 degree angle per scroll click
.delta = delta * 15,
- .delta_discrete = delta,
+ .delta_discrete = delta * WLR_POINTER_AXIS_DISCRETE_STEP,
};
wl_signal_emit_mutable(&output->pointer.events.axis, &ev);
wl_signal_emit_mutable(&output->pointer.events.frame, &output->pointer);