mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-02 01:40:13 -05:00
config: add scrollback.multiplier option
This option is used to multiply the mouse scroll amount for mouse and trackpad based scrollback scrolling. Closes #54.
This commit is contained in:
parent
93b03c91ed
commit
36468b0406
5 changed files with 22 additions and 2 deletions
5
input.c
5
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue