aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/output.c')
-rw-r--r--sway/commands/output.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sway/commands/output.c b/sway/commands/output.c
index c102344d..5e5d31b3 100644
--- a/sway/commands/output.c
+++ b/sway/commands/output.c
@@ -27,6 +27,7 @@ static const struct cmd_handler output_handlers[] = {
27 { "subpixel", output_cmd_subpixel }, 27 { "subpixel", output_cmd_subpixel },
28 { "toggle", output_cmd_toggle }, 28 { "toggle", output_cmd_toggle },
29 { "transform", output_cmd_transform }, 29 { "transform", output_cmd_transform },
30 { "unplug", output_cmd_unplug },
30}; 31};
31 32
32struct cmd_results *cmd_output(int argc, char **argv) { 33struct cmd_results *cmd_output(int argc, char **argv) {
@@ -102,15 +103,18 @@ struct cmd_results *cmd_output(int argc, char **argv) {
102 103
103 bool background = output->background; 104 bool background = output->background;
104 105
105 output = store_output_config(output); 106 store_output_config(output);
106 107
107 // If reloading, the output configs will be applied after reading the 108 // If reloading, the output configs will be applied after reading the
108 // entire config and before the deferred commands so that an auto generated 109 // entire config and before the deferred commands so that an auto generated
109 // workspace name is not given to re-enabled outputs. 110 // workspace name is not given to re-enabled outputs.
110 if (!config->reloading && !config->validating) { 111 if (!config->reloading && !config->validating) {
111 apply_output_config_to_outputs(output); 112 apply_all_output_configs();
112 if (background) { 113 if (background) {
113 spawn_swaybg(); 114 if (!spawn_swaybg()) {
115 return cmd_results_new(CMD_FAILURE,
116 "Failed to apply background configuration");
117 }
114 } 118 }
115 } 119 }
116 120