ei: Fix flipped scroll axes
This commit is contained in:
parent
ec862648c9
commit
bb569dfa00
3 changed files with 32 additions and 21 deletions
|
|
@ -6,6 +6,7 @@ use {
|
|||
ei_object::{EiObject, EiVersion},
|
||||
},
|
||||
fixed::Fixed,
|
||||
ifs::wl_seat::wl_pointer::{HORIZONTAL_SCROLL, VERTICAL_SCROLL},
|
||||
leaks::Tracker,
|
||||
wire_ei::{
|
||||
EiScrollId,
|
||||
|
|
@ -65,8 +66,8 @@ impl EiScrollRequestHandler for EiScroll {
|
|||
}
|
||||
|
||||
fn client_scroll(&self, req: ClientScroll, _slf: &Rc<Self>) -> Result<(), Self::Error> {
|
||||
self.device.scroll_px[0].set(Some(req.x));
|
||||
self.device.scroll_px[1].set(Some(req.y));
|
||||
self.device.scroll_px[HORIZONTAL_SCROLL as usize].set(Some(req.x));
|
||||
self.device.scroll_px[VERTICAL_SCROLL as usize].set(Some(req.y));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
@ -75,8 +76,8 @@ impl EiScrollRequestHandler for EiScroll {
|
|||
req: ClientScrollDiscrete,
|
||||
_slf: &Rc<Self>,
|
||||
) -> Result<(), Self::Error> {
|
||||
self.device.scroll_v120[0].set(Some(req.x));
|
||||
self.device.scroll_v120[1].set(Some(req.y));
|
||||
self.device.scroll_v120[HORIZONTAL_SCROLL as usize].set(Some(req.x));
|
||||
self.device.scroll_v120[VERTICAL_SCROLL as usize].set(Some(req.y));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
@ -85,8 +86,8 @@ impl EiScrollRequestHandler for EiScroll {
|
|||
req: ClientScrollStop,
|
||||
_slf: &Rc<Self>,
|
||||
) -> Result<(), Self::Error> {
|
||||
self.device.scroll_stop[0].set(Some(req.x != 0));
|
||||
self.device.scroll_stop[1].set(Some(req.y != 0));
|
||||
self.device.scroll_stop[HORIZONTAL_SCROLL as usize].set(Some(req.x != 0));
|
||||
self.device.scroll_stop[VERTICAL_SCROLL as usize].set(Some(req.y != 0));
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue