mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-18 22:05:25 -05:00
commit
5171abb188
5 changed files with 25 additions and 7 deletions
14
CHANGELOG.md
14
CHANGELOG.md
|
|
@ -17,6 +17,11 @@
|
|||
## Unreleased
|
||||
### Added
|
||||
### Changed
|
||||
|
||||
* Default value of the **scrollback.multiplier** option in `foot.ini`
|
||||
from `1.0` to `3.0`.
|
||||
|
||||
|
||||
### Deprecated
|
||||
### Removed
|
||||
### Fixed
|
||||
|
|
@ -29,6 +34,15 @@
|
|||
(https://codeberg.org/dnkl/foot/issues/141).
|
||||
* Scrollback position is now retained when resizing the window
|
||||
(https://codeberg.org/dnkl/foot/issues/142).
|
||||
* Trackpad scrolling speed. Note that it is much slower compared to
|
||||
previous foot versions. Use the **multiplier** option in `foot.ini`
|
||||
if you find the new speed too slow
|
||||
(https://codeberg.org/dnkl/foot/issues/144).
|
||||
* Trackpad scrolling speed to better match the mouse scrolling speed,
|
||||
and to be consistent with other (Wayland) terminal emulators. Note
|
||||
that it is (much) slower compared to previous foot versions. Use the
|
||||
**multiplier** option in `foot.ini` if you find the new speed too
|
||||
slow (https://codeberg.org/dnkl/foot/issues/144).
|
||||
|
||||
|
||||
### Security
|
||||
|
|
|
|||
2
config.c
2
config.c
|
|
@ -1869,7 +1869,7 @@ config_load(struct config *conf, const char *conf_path,
|
|||
.format = SCROLLBACK_INDICATOR_FORMAT_TEXT,
|
||||
.text = wcsdup(L""),
|
||||
},
|
||||
.multiplier = 1.,
|
||||
.multiplier = 3.,
|
||||
},
|
||||
.colors = {
|
||||
.fg = default_foreground,
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ in this order:
|
|||
|
||||
*multiplier*
|
||||
Amount to multiply mouse scrolling with. It is a decimal number,
|
||||
i.e. fractions are allowed. Default: _1.0_.
|
||||
i.e. fractions are allowed. Default: _3.0_.
|
||||
|
||||
*indicator-position*
|
||||
Configures the style of the scrollback position indicator. One of
|
||||
|
|
|
|||
2
foot.ini
2
foot.ini
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
[scrollback]
|
||||
# lines=1000
|
||||
# multiplier=1.0
|
||||
# multiplier=3.0
|
||||
# indicator-position=relative
|
||||
# indicator-format=
|
||||
|
||||
|
|
|
|||
12
input.c
12
input.c
|
|
@ -1688,6 +1688,8 @@ wl_pointer_axis(void *data, struct wl_pointer *wl_pointer,
|
|||
if (seat->mouse.have_discrete)
|
||||
return;
|
||||
|
||||
assert(seat->mouse_focus != NULL);
|
||||
|
||||
/*
|
||||
* Aggregate scrolled amount until we get at least 1.0
|
||||
*
|
||||
|
|
@ -1697,10 +1699,12 @@ wl_pointer_axis(void *data, struct wl_pointer *wl_pointer,
|
|||
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));
|
||||
seat->mouse.axis_aggregated = 0.;
|
||||
}
|
||||
if (fabs(seat->mouse.axis_aggregated) < seat->mouse_focus->cell_height)
|
||||
return;
|
||||
|
||||
int lines = seat->mouse.axis_aggregated / seat->mouse_focus->cell_height;
|
||||
mouse_scroll(seat, lines);
|
||||
seat->mouse.axis_aggregated -= (double)lines * seat->mouse_focus->cell_height;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue