diff options
Diffstat (limited to 'sway/config/output.c')
-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 4a0a5cc9..26798503 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -14,13 +14,18 @@ int output_name_cmp(const void *item, const void *data) { | |||
14 | return strcmp(output->name, name); | 14 | return strcmp(output->name, name); |
15 | } | 15 | } |
16 | 16 | ||
17 | void output_config_defaults(struct output_config *oc) { | 17 | struct output_config *new_output_config() { |
18 | struct output_config *oc = calloc(1, sizeof(struct output_config)); | ||
19 | if (oc == NULL) { | ||
20 | return NULL; | ||
21 | } | ||
18 | oc->enabled = -1; | 22 | oc->enabled = -1; |
19 | oc->width = oc->height -1; | 23 | oc->width = oc->height -1; |
20 | oc->refresh_rate = -1; | 24 | oc->refresh_rate = -1; |
21 | oc->x = oc->y = -1; | 25 | oc->x = oc->y = -1; |
22 | oc->scale = -1; | 26 | oc->scale = -1; |
23 | oc->transform = -1; | 27 | oc->transform = -1; |
28 | return oc; | ||
24 | } | 29 | } |
25 | 30 | ||
26 | void merge_output_config(struct output_config *dst, struct output_config *src) { | 31 | void merge_output_config(struct output_config *dst, struct output_config *src) { |