fix duplicate barriers + use Notify

This commit is contained in:
Ferdinand Schober
2024-07-11 15:35:37 +02:00
parent d73ced7b16
commit f0c9290579
3 changed files with 43 additions and 35 deletions

View File

@@ -123,15 +123,15 @@ async fn do_capture(
.await;
// FIXME DUPLICATES
let clients = server
.client_manager
.borrow()
.get_client_states()
.map(|(h, (c, _))| (h, c.pos))
.collect::<Vec<_>>();
for (handle, pos) in clients {
capture.create(handle, pos.into()).await?;
}
// let clients = server
// .client_manager
// .borrow()
// .get_client_states()
// .map(|(h, (c, _))| (h, c.pos))
// .collect::<Vec<_>>();
// for (handle, pos) in clients {
// capture.create(handle, pos.into()).await?;
// }
let mut pressed_keys = HashSet::new();
loop {

View File

@@ -129,17 +129,17 @@ async fn do_emulation(
.send(FrontendEvent::EmulationStatus(Status::Enabled))
.await;
// FIMXE DUPLICATES
// FIXME DUPLICATES
// add clients
let clients = server
.client_manager
.borrow()
.get_client_states()
.map(|(h, _)| h)
.collect::<Vec<_>>();
for handle in clients {
emulation.create(handle).await;
}
// let clients = server
// .client_manager
// .borrow()
// .get_client_states()
// .map(|(h, _)| h)
// .collect::<Vec<_>>();
// for handle in clients {
// emulation.create(handle).await;
// }
let mut last_ignored = None;
loop {