1
0
Fork 0
forked from wry/wry

tree: make surface visibility tracking more robust

This commit is contained in:
Julian Orth 2024-03-29 20:07:28 +01:00
parent be0935c8dd
commit ba98103233
26 changed files with 313 additions and 144 deletions

View file

@ -389,8 +389,11 @@ impl MetalConnector {
async fn present_loop(self: Rc<Self>) {
loop {
self.present_trigger.triggered().await;
if let Err(e) = self.present(true) {
log::error!("Could not present: {}", ErrorFmt(e));
match self.present(true) {
Ok(_) => self.state.set_backend_idle(false),
Err(e) => {
log::error!("Could not present: {}", ErrorFmt(e));
}
}
}
}