linux: scrolling improvements (#9103)

This PR adjusts scrolling to be a lot faster on Linux and also makes
terminal scrolling work.

For Wayland, it makes scrolling faster by handling the `AxisValue120`
event (which also allows high-resolution scrolling on supported mice)
On X11, changed the 1 line per scroll to 3.

### Different solutions

I tried replicating Chromium's scrolling behaviour, but it was
inconsistent in X11/Wayland and found it too fast on Wayland. Plus, it
also didn't match VSCode, since it seems that they do something
different.

Release Notes:

- Made scrolling faster on Linux
- Made terminal scroll on Linux
This commit is contained in:
apricotbucket28 2024-03-18 18:50:29 -03:00 committed by GitHub
parent c0f8581b29
commit d8e32c3e3c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 68 additions and 10 deletions

View file

@ -30,6 +30,8 @@ use crate::{
use super::x11::X11Client;
pub(super) const SCROLL_LINES: f64 = 3.0;
#[derive(Default)]
pub(crate) struct Callbacks {
open_urls: Option<Box<dyn FnMut(Vec<String>)>>,