mirror of
https://github.com/wez/wezterm.git
synced 2024-09-20 03:09:06 +03:00
x11: improve default wheel distance per tick
On x11 we'd get just a single line per scroll wheel tick. Contrast with Wayland where we get multiple. This config change makes us feel more snappy by default on X11. I'd like to make this configurable using the live configuration infra, but we don't currently have a way for this crate to see that config, so this just changes the default to be "better". refs: https://github.com/wez/wezterm/issues/92
This commit is contained in:
parent
8d3e513ed8
commit
e424a4ce6c
@ -324,7 +324,17 @@ impl XWindowInner {
|
||||
if r == xcb::BUTTON_RELEASE {
|
||||
return Ok(());
|
||||
}
|
||||
MouseEventKind::VertWheel(if b == 4 { 1 } else { -1 })
|
||||
|
||||
// Ideally this would be configurable, but it's currently a bit
|
||||
// awkward to configure this layer, so let's just improve the
|
||||
// default for now!
|
||||
const LINES_PER_TICK: i16 = 5;
|
||||
|
||||
MouseEventKind::VertWheel(if b == 4 {
|
||||
LINES_PER_TICK
|
||||
} else {
|
||||
-LINES_PER_TICK
|
||||
})
|
||||
}
|
||||
_ => {
|
||||
eprintln!("button {} is not implemented", button_press.detail());
|
||||
|
Loading…
Reference in New Issue
Block a user