config: Don't disable all outputs on missing config
This commit is contained in:
parent
fc04ef2157
commit
3d31641c98
1 changed files with 31 additions and 0 deletions
|
|
@ -374,6 +374,37 @@ impl Config {
|
|||
}
|
||||
}
|
||||
|
||||
output_state.update();
|
||||
self.write_outputs(output_state.outputs());
|
||||
} else {
|
||||
for output in outputs {
|
||||
if let Err(err) = backend.apply_config_for_output(
|
||||
&output,
|
||||
false,
|
||||
shell,
|
||||
seats.iter().cloned(),
|
||||
loop_handle,
|
||||
) {
|
||||
slog_scope::warn!(
|
||||
"Failed to set new config for output {}: {}",
|
||||
output.name(),
|
||||
err
|
||||
);
|
||||
} else {
|
||||
if output
|
||||
.user_data()
|
||||
.get::<RefCell<OutputConfig>>()
|
||||
.unwrap()
|
||||
.borrow()
|
||||
.enabled
|
||||
{
|
||||
output_state.enable_head(&output);
|
||||
} else {
|
||||
output_state.disable_head(&output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
output_state.update();
|
||||
self.write_outputs(output_state.outputs());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue