mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-01 20:21:26 +03:00
committed by
GitHub
parent
973360a774
commit
1f0d386d4a
@@ -750,14 +750,24 @@ impl Dispatch<WlPointer, ()> for State {
|
||||
}),
|
||||
));
|
||||
}
|
||||
wl_pointer::Event::AxisValue120 { axis, value120 } => {
|
||||
wl_pointer::Event::Axis { time, axis, value } => {
|
||||
let (_, client) = app.focused.as_ref().unwrap();
|
||||
app.pending_events.push_back((
|
||||
*client,
|
||||
Event::Pointer(PointerEvent::Axis {
|
||||
time: 0,
|
||||
time,
|
||||
axis: u32::from(axis) as u8,
|
||||
value: value120 as f64,
|
||||
value,
|
||||
}),
|
||||
));
|
||||
}
|
||||
wl_pointer::Event::AxisValue120 { axis, value120 } => {
|
||||
let (_, client) = app.focused.as_ref().unwrap();
|
||||
app.pending_events.push_back((
|
||||
*client,
|
||||
Event::Pointer(PointerEvent::AxisDiscrete120 {
|
||||
axis: u32::from(axis) as u8,
|
||||
value: value120,
|
||||
}),
|
||||
));
|
||||
}
|
||||
|
||||
@@ -139,10 +139,9 @@ fn to_mouse_event(wparam: WPARAM, lparam: LPARAM) -> Option<PointerEvent> {
|
||||
relative_y: dy as f64,
|
||||
})
|
||||
},
|
||||
WPARAM(p) if p == WM_MOUSEWHEEL as usize => Some(PointerEvent::Axis {
|
||||
time: 0,
|
||||
WPARAM(p) if p == WM_MOUSEWHEEL as usize => Some(PointerEvent::AxisDiscrete120 {
|
||||
axis: 0,
|
||||
value: -(mouse_low_level.mouseData as i32) as f64,
|
||||
value: -(mouse_low_level.mouseData as i32),
|
||||
}),
|
||||
WPARAM(p) if p == WM_XBUTTONDOWN as usize || p == WM_XBUTTONUP as usize => {
|
||||
let hb = mouse_low_level.mouseData >> 16;
|
||||
|
||||
Reference in New Issue
Block a user