Add new_output_config, update root container size on output hotplug

This commit is contained in:
emersion 2017-12-06 19:45:43 +01:00
parent 41dd291612
commit 8764dc26c6
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
4 changed files with 9 additions and 6 deletions

View file

@ -27,11 +27,10 @@ struct cmd_results *cmd_output(int argc, char **argv) {
}
const char *name = argv[0];
struct output_config *output = calloc(1, sizeof(struct output_config));
struct output_config *output = new_output_config();
if (!output) {
return cmd_results_new(CMD_FAILURE, "output", "Unable to allocate output config");
}
output_config_defaults(output);
output->name = strdup(name);
// TODO: atoi doesn't handle invalid numbers