all: make scroll axis handling more robust
This commit is contained in:
parent
bb569dfa00
commit
7305f68909
10 changed files with 38 additions and 33 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue