1
0
Fork 0
forked from wry/wry

all: make scroll axis handling more robust

This commit is contained in:
Julian Orth 2025-03-20 21:09:16 +01:00
parent bb569dfa00
commit 7305f68909
10 changed files with 38 additions and 33 deletions

View file

@ -21,6 +21,7 @@ use {
},
},
},
linearize::LinearizeExt,
std::{cell::Cell, rc::Rc},
thiserror::Error,
};
@ -204,7 +205,7 @@ impl EiDeviceRequestHandler for EiDevice {
}
{
let mut need_frame = false;
for axis in [ScrollAxis::Horizontal, ScrollAxis::Vertical] {
for axis in ScrollAxis::variants() {
let idx = axis as usize;
if let Some(v120) = self.scroll_v120[idx].take() {
need_frame = true;