shell: trigger re-render when surface disappears

This commit is contained in:
Victoria Brekenfeld 2022-02-04 20:57:56 +01:00
parent 56e72b4fef
commit 825430fdfd
4 changed files with 47 additions and 5 deletions

View file

@ -7,6 +7,7 @@ use smithay::reexports::{
use anyhow::{Context, Result};
use slog::Drain;
use std::sync::atomic::Ordering;
pub mod backend;
pub mod input;
@ -42,12 +43,18 @@ fn main() -> Result<()> {
return;
}
// trigger routines
state.common.spaces.refresh();
// do we need to trigger another render
if state.common.dirty_flag.swap(false, Ordering::SeqCst) {
for output in state.common.spaces.outputs() {
state.backend.schedule_render(output)
}
}
// send out events
let display = state.common.display.clone();
display.borrow_mut().flush_clients(state);
// trigger routines
state.common.spaces.refresh();
})?;
Ok(())