kms: lock during screen conf changes

This commit is contained in:
Victoria Brekenfeld 2025-07-16 21:13:50 +02:00 committed by Victoria Brekenfeld
parent bb7a6a7113
commit e34a289c01
10 changed files with 747 additions and 382 deletions

View file

@ -100,10 +100,11 @@ impl WinitState {
Ok(())
}
pub fn apply_config_for_outputs(
&mut self,
test_only: bool,
) -> Result<Vec<Output>, anyhow::Error> {
pub fn all_outputs(&self) -> Vec<Output> {
vec![self.output.clone()]
}
pub fn apply_config_for_outputs(&mut self, test_only: bool) -> Result<(), anyhow::Error> {
// TODO: if we ever have multiple winit outputs, don't ignore config.enabled
// reset size
let size = self.backend.window_size();
@ -119,7 +120,7 @@ impl WinitState {
}
Err(anyhow::anyhow!("Cannot set window size"))
} else {
Ok(vec![self.output.clone()])
Ok(())
}
}