shell: read in config, if available
This commit is contained in:
parent
55c10830e8
commit
a9d6b8c3d7
8 changed files with 276 additions and 46 deletions
|
|
@ -301,7 +301,7 @@ impl State {
|
|||
&mut self.common.display.borrow_mut(),
|
||||
&mut self.common.event_loop_handle,
|
||||
) {
|
||||
Ok(output) => self.common.shell.map_output(&output),
|
||||
Ok(output) => self.common.shell.map_output(&output, &mut self.backend, &self.common.config),
|
||||
Err(err) => slog_scope::warn!("Failed to initialize output: {}", err),
|
||||
};
|
||||
}
|
||||
|
|
@ -332,7 +332,7 @@ impl State {
|
|||
&mut self.common.display.borrow_mut(),
|
||||
&mut self.common.event_loop_handle,
|
||||
) {
|
||||
Ok(output) => self.common.shell.map_output(&output),
|
||||
Ok(output) => self.common.shell.map_output(&output, &mut self.backend, &self.common.config),
|
||||
Err(err) => slog_scope::warn!("Failed to initialize output: {}", err),
|
||||
};
|
||||
}
|
||||
|
|
@ -571,6 +571,10 @@ impl Surface {
|
|||
}
|
||||
|
||||
impl KmsState {
|
||||
pub fn apply_config_for_output(&mut self, output: &Output) -> Result<(), impl std::error::Error> {
|
||||
|
||||
}
|
||||
|
||||
pub fn schedule_render(&mut self, output: &Output) {
|
||||
if let Some((device, surface)) = self
|
||||
.devices
|
||||
|
|
|
|||
|
|
@ -102,8 +102,6 @@ pub fn init_backend(event_loop: &mut EventLoop<State>, state: &mut State) -> Res
|
|||
);
|
||||
output.set_preferred(mode);
|
||||
|
||||
state.common.shell.map_output(&output);
|
||||
|
||||
let (event_ping, event_source) =
|
||||
ping::make_ping().with_context(|| "Failed to init eventloop timer for winit")?;
|
||||
let (render_ping, render_source) =
|
||||
|
|
@ -150,6 +148,7 @@ pub fn init_backend(event_loop: &mut EventLoop<State>, state: &mut State) -> Res
|
|||
#[cfg(feature = "debug")]
|
||||
fps: Fps::default(),
|
||||
});
|
||||
state.common.shell.map_output(&output, &mut state.backend, &state.common.config);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ pub fn init_backend(event_loop: &mut EventLoop<State>, state: &mut State) -> Res
|
|||
.x11()
|
||||
.add_window(&mut *state.common.display.borrow_mut(), event_loop.handle())
|
||||
.with_context(|| "Failed to create wl_output")?;
|
||||
state.common.shell.map_output(&output);
|
||||
state.common.shell.map_output(&output, &mut state.backend, &state.common.config);
|
||||
|
||||
event_loop
|
||||
.handle()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue