shell: read in config, if available

This commit is contained in:
Victoria Brekenfeld 2022-03-30 13:47:06 +02:00
parent 55c10830e8
commit a9d6b8c3d7
8 changed files with 276 additions and 46 deletions

View file

@ -2,7 +2,7 @@
use crate::{
backend::{kms::KmsState, winit::WinitState, x11::X11State},
config::Config,
config::{Config, OutputConfig},
logger::LogState,
shell::{init_shell, Shell},
};
@ -105,6 +105,16 @@ impl BackendData {
}
}
pub fn apply_config_for_output(&mut self, output: &Output) -> Result<(), impl 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(())
},
}
}
pub fn schedule_render(&mut self, output: &Output) {
match self {
BackendData::Winit(_) => {} // We cannot do this on the winit backend.