mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 06:05:58 +01:00
backend/x11: fix delta_discrete value
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3563
This commit is contained in:
parent
5f264a7d6c
commit
9c7db7124e
1 changed files with 2 additions and 2 deletions
|
@ -47,9 +47,9 @@ static void send_axis_event(struct wlr_x11_output *output, int32_t delta,
|
||||||
.time_msec = time,
|
.time_msec = time,
|
||||||
.source = WLR_AXIS_SOURCE_WHEEL,
|
.source = WLR_AXIS_SOURCE_WHEEL,
|
||||||
.orientation = WLR_AXIS_ORIENTATION_VERTICAL,
|
.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 = 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.axis, &ev);
|
||||||
wl_signal_emit_mutable(&output->pointer.events.frame, &output->pointer);
|
wl_signal_emit_mutable(&output->pointer.events.frame, &output->pointer);
|
||||||
|
|
Loading…
Reference in a new issue