mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-16 18:01:26 +03:00
Avoid sending frame events (#29)
* Avoid sending frame events Frame events are now implicit - each network event implies a frame event TODO: Accumulate correctly * remove trace logs from producer
This commit is contained in:
committed by
GitHub
parent
06725f4b14
commit
851b6d60eb
@@ -598,7 +598,6 @@ impl Dispatch<wl_pointer::WlPointer, ()> for State {
|
||||
surface_y: _,
|
||||
} => {
|
||||
// get client corresponding to the focused surface
|
||||
log::trace!("produce: enter()");
|
||||
{
|
||||
if let Some((window, client)) = app
|
||||
.client_for_window
|
||||
@@ -618,7 +617,6 @@ impl Dispatch<wl_pointer::WlPointer, ()> for State {
|
||||
app.pending_events.push((*client, Event::Release()));
|
||||
}
|
||||
wl_pointer::Event::Leave { .. } => {
|
||||
log::trace!("produce: leave()");
|
||||
app.ungrab();
|
||||
}
|
||||
wl_pointer::Event::Button {
|
||||
@@ -627,7 +625,6 @@ impl Dispatch<wl_pointer::WlPointer, ()> for State {
|
||||
button,
|
||||
state,
|
||||
} => {
|
||||
log::trace!("produce: button()");
|
||||
let (_, client) = app.focused.as_ref().unwrap();
|
||||
app.pending_events.push((
|
||||
*client,
|
||||
@@ -639,7 +636,6 @@ impl Dispatch<wl_pointer::WlPointer, ()> for State {
|
||||
));
|
||||
}
|
||||
wl_pointer::Event::Axis { time, axis, value } => {
|
||||
log::trace!("produce: scroll()");
|
||||
let (_, client) = app.focused.as_ref().unwrap();
|
||||
app.pending_events.push((
|
||||
*client,
|
||||
@@ -651,12 +647,9 @@ impl Dispatch<wl_pointer::WlPointer, ()> for State {
|
||||
));
|
||||
}
|
||||
wl_pointer::Event::Frame {} => {
|
||||
log::trace!("produce: frame()");
|
||||
let (_, client) = app.focused.as_ref().unwrap();
|
||||
app.pending_events.push((
|
||||
*client,
|
||||
Event::Pointer(PointerEvent::Frame {}),
|
||||
));
|
||||
// TODO properly handle frame events
|
||||
// we simply insert a frame event on the client side
|
||||
// after each event for now
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
@@ -749,7 +742,6 @@ impl Dispatch<ZwpRelativePointerV1, ()> for State {
|
||||
dy_unaccel: surface_y,
|
||||
} = event
|
||||
{
|
||||
log::trace!("produce: motion()");
|
||||
if let Some((_window, client)) = &app.focused {
|
||||
let time = (((utime_hi as u64) << 32 | utime_lo as u64) / 1000) as u32;
|
||||
app.pending_events.push((
|
||||
|
||||
Reference in New Issue
Block a user