diff options
Diffstat (limited to 'sway/commands/output.c')
-rw-r--r-- | sway/commands/output.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sway/commands/output.c b/sway/commands/output.c index 125df5a7..5e5d31b3 100644 --- a/sway/commands/output.c +++ b/sway/commands/output.c | |||
@@ -18,6 +18,7 @@ static const struct cmd_handler output_handlers[] = { | |||
18 | { "modeline", output_cmd_modeline }, | 18 | { "modeline", output_cmd_modeline }, |
19 | { "pos", output_cmd_position }, | 19 | { "pos", output_cmd_position }, |
20 | { "position", output_cmd_position }, | 20 | { "position", output_cmd_position }, |
21 | { "power", output_cmd_power }, | ||
21 | { "render_bit_depth", output_cmd_render_bit_depth }, | 22 | { "render_bit_depth", output_cmd_render_bit_depth }, |
22 | { "res", output_cmd_mode }, | 23 | { "res", output_cmd_mode }, |
23 | { "resolution", output_cmd_mode }, | 24 | { "resolution", output_cmd_mode }, |
@@ -26,6 +27,7 @@ static const struct cmd_handler output_handlers[] = { | |||
26 | { "subpixel", output_cmd_subpixel }, | 27 | { "subpixel", output_cmd_subpixel }, |
27 | { "toggle", output_cmd_toggle }, | 28 | { "toggle", output_cmd_toggle }, |
28 | { "transform", output_cmd_transform }, | 29 | { "transform", output_cmd_transform }, |
30 | { "unplug", output_cmd_unplug }, | ||
29 | }; | 31 | }; |
30 | 32 | ||
31 | struct cmd_results *cmd_output(int argc, char **argv) { | 33 | struct cmd_results *cmd_output(int argc, char **argv) { |
@@ -101,15 +103,18 @@ struct cmd_results *cmd_output(int argc, char **argv) { | |||
101 | 103 | ||
102 | bool background = output->background; | 104 | bool background = output->background; |
103 | 105 | ||
104 | output = store_output_config(output); | 106 | store_output_config(output); |
105 | 107 | ||
106 | // If reloading, the output configs will be applied after reading the | 108 | // If reloading, the output configs will be applied after reading the |
107 | // 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 |
108 | // workspace name is not given to re-enabled outputs. | 110 | // workspace name is not given to re-enabled outputs. |
109 | if (!config->reloading && !config->validating) { | 111 | if (!config->reloading && !config->validating) { |
110 | apply_output_config_to_outputs(output); | 112 | apply_all_output_configs(); |
111 | if (background) { | 113 | if (background) { |
112 | spawn_swaybg(); | 114 | if (!spawn_swaybg()) { |
115 | return cmd_results_new(CMD_FAILURE, | ||
116 | "Failed to apply background configuration"); | ||
117 | } | ||
113 | } | 118 | } |
114 | } | 119 | } |
115 | 120 | ||