shell: read in config, if available
This commit is contained in:
parent
55c10830e8
commit
a9d6b8c3d7
8 changed files with 276 additions and 46 deletions
12
src/state.rs
12
src/state.rs
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue