mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-08 08:20:59 -04:00
commit
5171abb188
5 changed files with 25 additions and 7 deletions
14
CHANGELOG.md
14
CHANGELOG.md
|
|
@ -17,6 +17,11 @@
|
||||||
## Unreleased
|
## Unreleased
|
||||||
### Added
|
### Added
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* Default value of the **scrollback.multiplier** option in `foot.ini`
|
||||||
|
from `1.0` to `3.0`.
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
@ -29,6 +34,15 @@
|
||||||
(https://codeberg.org/dnkl/foot/issues/141).
|
(https://codeberg.org/dnkl/foot/issues/141).
|
||||||
* Scrollback position is now retained when resizing the window
|
* Scrollback position is now retained when resizing the window
|
||||||
(https://codeberg.org/dnkl/foot/issues/142).
|
(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
|
### 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,
|
.format = SCROLLBACK_INDICATOR_FORMAT_TEXT,
|
||||||
.text = wcsdup(L""),
|
.text = wcsdup(L""),
|
||||||
},
|
},
|
||||||
.multiplier = 1.,
|
.multiplier = 3.,
|
||||||
},
|
},
|
||||||
.colors = {
|
.colors = {
|
||||||
.fg = default_foreground,
|
.fg = default_foreground,
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ in this order:
|
||||||
|
|
||||||
*multiplier*
|
*multiplier*
|
||||||
Amount to multiply mouse scrolling with. It is a decimal number,
|
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*
|
*indicator-position*
|
||||||
Configures the style of the scrollback position indicator. One of
|
Configures the style of the scrollback position indicator. One of
|
||||||
|
|
|
||||||
2
foot.ini
2
foot.ini
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
[scrollback]
|
[scrollback]
|
||||||
# lines=1000
|
# lines=1000
|
||||||
# multiplier=1.0
|
# multiplier=3.0
|
||||||
# indicator-position=relative
|
# indicator-position=relative
|
||||||
# indicator-format=
|
# 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)
|
if (seat->mouse.have_discrete)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
assert(seat->mouse_focus != NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Aggregate scrolled amount until we get at least 1.0
|
* 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->mouse.axis_aggregated
|
||||||
+= seat->wayl->conf->scrollback.multiplier * wl_fixed_to_double(value);
|
+= seat->wayl->conf->scrollback.multiplier * wl_fixed_to_double(value);
|
||||||
|
|
||||||
if (fabs(seat->mouse.axis_aggregated) >= 1.) {
|
if (fabs(seat->mouse.axis_aggregated) < seat->mouse_focus->cell_height)
|
||||||
mouse_scroll(seat, round(seat->mouse.axis_aggregated));
|
return;
|
||||||
seat->mouse.axis_aggregated = 0.;
|
|
||||||
}
|
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
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue