mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-11 05:31:29 +03:00
simplify
This commit is contained in:
@@ -837,21 +837,16 @@ impl Dispatch<ZwpRelativePointerV1, ()> for State {
|
|||||||
if let zwp_relative_pointer_v1::Event::RelativeMotion {
|
if let zwp_relative_pointer_v1::Event::RelativeMotion {
|
||||||
utime_hi,
|
utime_hi,
|
||||||
utime_lo,
|
utime_lo,
|
||||||
dx: _,
|
dx_unaccel: dx,
|
||||||
dy: _,
|
dy_unaccel: dy,
|
||||||
dx_unaccel: surface_x,
|
..
|
||||||
dy_unaccel: surface_y,
|
|
||||||
} = event
|
} = event
|
||||||
{
|
{
|
||||||
if let Some((_window, client)) = &app.focused {
|
if let Some((_window, client)) = &app.focused {
|
||||||
let time = (((utime_hi as u64) << 32 | utime_lo as u64) / 1000) as u32;
|
let time = (((utime_hi as u64) << 32 | utime_lo as u64) / 1000) as u32;
|
||||||
app.pending_events.push_back((
|
app.pending_events.push_back((
|
||||||
*client,
|
*client,
|
||||||
Event::Pointer(PointerEvent::Motion {
|
Event::Pointer(PointerEvent::Motion { time, dx, dy }),
|
||||||
time,
|
|
||||||
dx: surface_x,
|
|
||||||
dy: surface_y,
|
|
||||||
}),
|
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user