diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-01-04 08:00:22 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-01-04 08:00:22 -0500 |
commit | b01a53abfb883f8767090415f1ec37b295b35146 (patch) | |
tree | 8381c59d4dce5595d923fed9b221640115b84682 /sway/config | |
parent | 8b4eb5d7d1846447b54ebf786c7dd6869a27670a (diff) | |
parent | 0f42f8c15889acd21c52ca4b138fad3e5ed4e64b (diff) |
Merge branch 'wlroots' into bindings
Diffstat (limited to 'sway/config')
-rw-r--r-- | sway/config/output.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index ff3f73a3..f336c949 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -14,11 +14,16 @@ int output_name_cmp(const void *item, const void *data) { return strcmp(output->name, name); } -struct output_config *new_output_config() { +struct output_config *new_output_config(const char *name) { struct output_config *oc = calloc(1, sizeof(struct output_config)); if (oc == NULL) { return NULL; } + oc->name = strdup(name); + if (oc->name == NULL) { + free(oc); + return NULL; + } oc->enabled = -1; oc->width = oc->height = -1; oc->refresh_rate = -1; |