1
0
Fork 0
forked from wry/wry

autocommit 2022-04-30 13:53:02 CEST

This commit is contained in:
Julian Orth 2022-04-30 13:53:02 +02:00
parent 3d4a6b21f3
commit ac56970f14
14 changed files with 132 additions and 53 deletions

View file

@ -3,6 +3,7 @@ use {
async_engine::FdStatus,
backend::{AxisSource, InputEvent, KeyState, ScrollAxis},
backends::metal::MetalBackend,
fixed::Fixed,
ifs::wl_seat::PX_PER_SCROLL,
libinput::{
consts::{
@ -15,7 +16,6 @@ use {
},
std::rc::Rc,
};
use crate::fixed::Fixed;
macro_rules! unpack {
($slf:expr, $ev:expr) => {{

View file

@ -761,7 +761,10 @@ impl XBackend {
};
seat.mouse_event(InputEvent::AxisSource(AxisSource::Wheel));
seat.mouse_event(InputEvent::AxisDiscrete(val, axis));
seat.mouse_event(InputEvent::Axis(Fixed::from_f64(val as f64 * PX_PER_SCROLL), axis));
seat.mouse_event(InputEvent::Axis(
Fixed::from_f64(val as f64 * PX_PER_SCROLL),
axis,
));
seat.mouse_event(InputEvent::Frame);
}
} else {