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

@ -1,6 +1,6 @@
use {
crate::{
backend::{InputDeviceId, KeyState},
backend::{InputDeviceId, KeyState, ScrollAxis},
client::Client,
fixed::Fixed,
ifs::wl_seat::{
@ -15,6 +15,7 @@ use {
object::{Object, Version},
wire::{JaySeatEventsId, jay_seat_events::*},
},
linearize::LinearizeExt,
std::{convert::Infallible, rc::Rc},
};
@ -95,7 +96,8 @@ impl JaySeatEvents {
source,
});
}
for axis in 0..1 {
for axis in ScrollAxis::variants() {
let axis = axis as usize;
if let Some(dist) = ps.v120[axis].get() {
self.client.event(Axis120 {
self_id: self.id,