wayland: Explicitly handle destroyed surfaces

This commit is contained in:
Victoria Brekenfeld 2022-11-08 10:32:53 +01:00
parent 78b9b07cec
commit 38c0acb943
7 changed files with 191 additions and 157 deletions

View file

@ -9,11 +9,7 @@ use smithay::{
};
use anyhow::{Context, Result};
use std::{
ffi::OsString,
os::unix::prelude::AsRawFd,
sync::{atomic::Ordering, Arc},
};
use std::{ffi::OsString, os::unix::prelude::AsRawFd, sync::Arc};
pub mod backend;
pub mod config;
@ -71,18 +67,6 @@ fn main() -> Result<()> {
data.state.common.shell.refresh();
state::Common::refresh_focus(&mut data.state);
// do we need to trigger another render
if data.state.common.dirty_flag.swap(false, Ordering::SeqCst) {
// TODO: Render workspace sessions
for output in data.state.common.shell.outputs() {
data.state.backend.schedule_render(
&data.state.common.event_loop_handle,
output,
None,
)
}
}
// send out events
let _ = data.display.flush_clients();
})?;