shell: load/update output configuration

This commit is contained in:
Victoria Brekenfeld 2022-04-05 16:35:58 +02:00
parent a9d6b8c3d7
commit ec861fadd4
11 changed files with 481 additions and 152 deletions

View file

@ -2,7 +2,7 @@
use crate::{
backend::{kms::KmsState, winit::WinitState, x11::X11State},
config::{Config, OutputConfig},
config::Config,
logger::LogState,
shell::{init_shell, Shell},
};
@ -105,13 +105,16 @@ impl BackendData {
}
}
pub fn apply_config_for_output(&mut self, output: &Output) -> Result<(), impl std::error::Error> {
pub fn apply_config_for_output(
&mut self,
output: &Output,
) -> Result<(), Box<dyn std::error::Error>> {
match self {
BackendData::Kms(ref mut state) => state.apply_config_for_output(output),
_ => {
// TODO: reset the mode for nested backends, because we have no control over it
Ok(())
},
}
}
}