aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-11-03 06:08:37 -0400
committerTony Crisci <tony@dubstepdish.com>2017-11-03 06:08:37 -0400
commit447c561d1588226fd6aeb6668c7adb352cb77725 (patch)
treedc15ec1724cebbd3c9d377b7d0ca2567f295940d /rootston
parent53021f8ed428a1a023769339e6162bfebbe4c7a2 (diff)
rootston: seat config by device
Diffstat (limited to 'rootston')
-rw-r--r--rootston/config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rootston/config.c b/rootston/config.c
index a3ae78be..815040bf 100644
--- a/rootston/config.c
+++ b/rootston/config.c
@@ -289,6 +289,7 @@ static int config_ini_handler(void *user, const char *section, const char *name,
if (!found) {
dc = calloc(1, sizeof(struct device_config));
dc->name = strdup(device_name);
+ dc->seat = strdup("seat0");
wl_list_insert(&config->devices, &dc->link);
}
@@ -298,6 +299,9 @@ static int config_ini_handler(void *user, const char *section, const char *name,
} else if (strcmp(name, "geometry") == 0) {
free(dc->mapped_box);
dc->mapped_box = parse_geometry(value);
+ } else if (strcmp(name, "seat") == 0) {
+ free(dc->seat);
+ dc->seat = strdup(value);
} else {
wlr_log(L_ERROR, "got unknown device config: %s", name);
}
@@ -387,6 +391,7 @@ void roots_config_destroy(struct roots_config *config) {
struct device_config *dc, *dtmp = NULL;
wl_list_for_each_safe(dc, dtmp, &config->devices, link) {
free(dc->name);
+ free(dc->seat);
free(dc->mapped_output);
free(dc->mapped_box);
free(dc);