comment about pointer relase in sending state

Figured out, why it sometimes happened that the pointer is released in
sending state. However nothing we can do about it.

(not a real issue)
This commit is contained in:
Ferdinand Schober
2024-01-08 16:54:14 +01:00
parent fa15048ad8
commit 767fc8bd6b
2 changed files with 7 additions and 1 deletions

View File

@@ -712,6 +712,13 @@ impl Dispatch<wl_pointer::WlPointer, ()> for State {
app.pending_events.push_back((*client, Event::Enter()));
}
wl_pointer::Event::Leave { .. } => {
/* There are rare cases, where when a window is opened in
* just the wrong moment, the pointer is released, while
* still grabbed.
* In that case, the pointer must be ungrabbed, otherwise
* it is impossible to grab it again (since the pointer
* lock, relative pointer,... objects are still in place)
*/
app.ungrab();
}
wl_pointer::Event::Button {

View File

@@ -131,7 +131,6 @@ impl Server {
tokio::select! {
event = producer.next() => {
let event = event.ok_or(anyhow!("event producer closed"))??;
log::debug!("producer event: {event:?}");
server.handle_producer_event(&mut producer, &sender_ch, &timer_ch, event).await?;
}
e = producer_notify_rx.recv() => {