diff options
author | emersion <contact@emersion.fr> | 2017-12-06 19:45:43 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2017-12-06 19:45:43 +0100 |
commit | 8764dc26c634379ca5b5c2c4fc26cf8be9adf027 (patch) | |
tree | 8e6298c8d4c234eb0dc87d04e9093d7df1c5f6b8 /sway/commands/output.c | |
parent | Use wlr_output_layout_get_box (diff) | |
download | sway-8764dc26c634379ca5b5c2c4fc26cf8be9adf027.tar.gz sway-8764dc26c634379ca5b5c2c4fc26cf8be9adf027.tar.zst sway-8764dc26c634379ca5b5c2c4fc26cf8be9adf027.zip |
Add new_output_config, update root container size on output hotplug
Diffstat (limited to 'sway/commands/output.c')
-rw-r--r-- | sway/commands/output.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sway/commands/output.c b/sway/commands/output.c index bbf8efc3..11da0ff6 100644 --- a/sway/commands/output.c +++ b/sway/commands/output.c | |||
@@ -27,11 +27,10 @@ struct cmd_results *cmd_output(int argc, char **argv) { | |||
27 | } | 27 | } |
28 | const char *name = argv[0]; | 28 | const char *name = argv[0]; |
29 | 29 | ||
30 | struct output_config *output = calloc(1, sizeof(struct output_config)); | 30 | struct output_config *output = new_output_config(); |
31 | if (!output) { | 31 | if (!output) { |
32 | return cmd_results_new(CMD_FAILURE, "output", "Unable to allocate output config"); | 32 | return cmd_results_new(CMD_FAILURE, "output", "Unable to allocate output config"); |
33 | } | 33 | } |
34 | output_config_defaults(output); | ||
35 | output->name = strdup(name); | 34 | output->name = strdup(name); |
36 | 35 | ||
37 | // TODO: atoi doesn't handle invalid numbers | 36 | // TODO: atoi doesn't handle invalid numbers |