mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-25 14:05:41 -05:00
Implement mouse scrolling with line deltas
This makes scrolling work for mouse wheels (was previously just trackpads).
This commit is contained in:
parent
4df29bb377
commit
3d26d3c68a
1 changed files with 10 additions and 2 deletions
12
src/input.rs
12
src/input.rs
|
@ -305,8 +305,16 @@ impl Processor {
|
||||||
terminal: &Term
|
terminal: &Term
|
||||||
) {
|
) {
|
||||||
match delta {
|
match delta {
|
||||||
MouseScrollDelta::LineDelta(_columns, _lines) => {
|
MouseScrollDelta::LineDelta(_columns, lines) => {
|
||||||
unimplemented!();
|
let code = if lines > 0.0 {
|
||||||
|
64
|
||||||
|
} else {
|
||||||
|
65
|
||||||
|
};
|
||||||
|
|
||||||
|
for _ in 0..(lines.abs() as usize) {
|
||||||
|
self.mouse_report(code, notifier, terminal);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
MouseScrollDelta::PixelDelta(_x, y) => {
|
MouseScrollDelta::PixelDelta(_x, y) => {
|
||||||
match phase {
|
match phase {
|
||||||
|
|
Loading…
Reference in a new issue