aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorTamino Bauknecht <dev@tb6.eu>2023-12-12 22:54:31 +0100
committerSimon Ser <contact@emersion.fr>2024-01-29 14:12:39 +0100
commitc8676fad54bb0f4152947a6781626872bfa6ad64 (patch)
treeeeb76f1fe675424703eed79b97325af23b355d62 /sway/commands
parente39b0b816b8fe58a8c8e0ca1c0082c5065d444cc (diff)
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.
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/output.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/commands/output.c b/sway/commands/output.c
index df32c673..462dffd2 100644
--- a/sway/commands/output.c
+++ b/sway/commands/output.c
@@ -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");
+ }
}
}