kms: Fix damage issues due to timing

This commit is contained in:
Victoria Brekenfeld 2022-11-09 12:39:47 +01:00
parent fcf39337a7
commit 48c071466f
2 changed files with 55 additions and 12 deletions

View file

@ -901,6 +901,18 @@ impl State {
}
}
pub fn workspace_session_for_output(
&mut self,
output: &Output,
) -> Option<Vec<(Session, BufferParams)>> {
let workspace = self.common.shell.active_space_mut(output);
if !workspace.pending_buffers.is_empty() {
Some(std::mem::take(&mut workspace.pending_buffers))
} else {
None
}
}
pub fn schedule_workspace_sessions(
&mut self,
surface: &WlSurface,