aboutsummaryrefslogtreecommitdiff
path: root/sway/config/output.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-12-06 19:45:43 +0100
committeremersion <contact@emersion.fr>2017-12-06 19:45:43 +0100
commit8764dc26c634379ca5b5c2c4fc26cf8be9adf027 (patch)
tree8e6298c8d4c234eb0dc87d04e9093d7df1c5f6b8 /sway/config/output.c
parent41dd29161249dd6b6c3288a2d4cf63763f40ce14 (diff)
Add new_output_config, update root container size on output hotplug
Diffstat (limited to 'sway/config/output.c')
-rw-r--r--sway/config/output.c7
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) {
return strcmp(output->name, name);
}
-void output_config_defaults(struct output_config *oc) {
+struct output_config *new_output_config() {
+ struct output_config *oc = calloc(1, sizeof(struct output_config));
+ if (oc == NULL) {
+ return NULL;
+ }
oc->enabled = -1;
oc->width = oc->height -1;
oc->refresh_rate = -1;
oc->x = oc->y = -1;
oc->scale = -1;
oc->transform = -1;
+ return oc;
}
void merge_output_config(struct output_config *dst, struct output_config *src) {