1
0
Fork 0
forked from wry/wry

input: implement wl_seat version 9

This commit is contained in:
Julian Orth 2024-02-04 19:51:36 +01:00
parent 887e2b6cbc
commit 78b557b4a1
15 changed files with 91 additions and 20 deletions

View file

@ -149,11 +149,13 @@ impl MetalBackend {
InputEvent::Axis120 {
dist: scroll as _,
axis,
inverted: dev.natural_scrolling.get(),
}
} else {
InputEvent::AxisPx {
dist: Fixed::from_f64(scroll),
axis,
inverted: dev.natural_scrolling.get(),
}
};
dev.event(ie);

View file

@ -287,6 +287,7 @@ impl MetalBackend {
events: Default::default(),
cb: Default::default(),
name: Default::default(),
natural_scrolling: Default::default(),
pressed_keys: Default::default(),
pressed_buttons: Default::default(),
left_handed: Default::default(),
@ -336,6 +337,8 @@ impl MetalBackend {
};
inputdev.device().set_slot(slot);
dev.name.set(Rc::new(inputdev.device().name()));
dev.natural_scrolling
.set(inputdev.device().natural_scrolling_enabled());
dev.inputdev.set(Some(inputdev));
dev.apply_config();
slf.state