mirror of
https://github.com/swaywm/sway.git
synced 2026-04-20 06:47:03 -04:00
sway/output: Improve logging of swaybg execvp failure and more checks
This doesn't catch the error if a background changing command is executed via swaymsg, but improves logging. The additional checks at least propagate if e.g. forking failed.
This commit is contained in:
parent
e39b0b816b
commit
c8676fad54
2 changed files with 10 additions and 4 deletions
|
|
@ -111,7 +111,10 @@ struct cmd_results *cmd_output(int argc, char **argv) {
|
|||
if (!config->reloading && !config->validating) {
|
||||
apply_output_config_to_outputs(output);
|
||||
if (background) {
|
||||
spawn_swaybg();
|
||||
if (!spawn_swaybg()) {
|
||||
return cmd_results_new(CMD_FAILURE,
|
||||
"Failed to apply background configuration");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue