aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-08-03 17:43:06 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-08-03 18:08:39 +0000
commit36468b0406023cb8d66999eaabfdc5bbf94157d8 (patch)
tree5ddd198c1cb58599b19321b095f83da6f3839781 /input.c
parentinput: hide-when-typing: ignore modifiers (diff)
config: add scrollback.multiplier option
This option is used to multiply the mouse scroll amount for mouse and trackpad based scrollback scrolling. Closes #54.
Diffstat (limited to 'input.c')
-rw-r--r--input.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/input.c b/input.c
index 8d59780f..97563930 100644
--- a/input.c
+++ b/input.c
@@ -1544,7 +1544,8 @@ wl_pointer_axis(void *data, struct wl_pointer *wl_pointer,
* Without this, very slow scrolling will never actually scroll
* anything.
*/
- seat->mouse.axis_aggregated += wl_fixed_to_double(value);
+ seat->mouse.axis_aggregated
+ += seat->wayl->conf->scrollback.multiplier * wl_fixed_to_double(value);
if (fabs(seat->mouse.axis_aggregated) >= 1.) {
mouse_scroll(seat, round(seat->mouse.axis_aggregated));
@@ -1561,7 +1562,7 @@ wl_pointer_axis_discrete(void *data, struct wl_pointer *wl_pointer,
struct seat *seat = data;
seat->mouse.have_discrete = true;
- mouse_scroll(seat, discrete);
+ mouse_scroll(seat, seat->wayl->conf->scrollback.multiplier * discrete);
}
static void