ignore every event except Enter in receiving mode (#65)

Modifier or other key events are still sent by some compositors after leaving the window which causes them to be pressed on both devices.
Now an Enter event must be produced before any further events are sent out (except disconnect)
This commit is contained in:
Ferdinand Schober
2024-01-05 18:00:30 +01:00
committed by GitHub
parent eb366bcd34
commit fa15048ad8
2 changed files with 8 additions and 3 deletions

View File

@@ -824,6 +824,11 @@ impl Server {
start_timer = true;
log::trace!("STATE ===> AwaitingLeave");
enter = true;
} else {
// ignore any potential events in receiving mode
if self.state.get() == State::Receiving && e != Event::Disconnect() {
return Ok(());
}
}
(client_state.active_addr, enter, start_timer)