add cursor configuration

This commit is contained in:
Tony Crisci 2017-08-25 08:58:02 -04:00
parent b3a43e2261
commit 699d489f93
4 changed files with 29 additions and 0 deletions

View file

@ -67,6 +67,12 @@ static int config_ini_handler(void *user, const char *section, const char *name,
wlr_log(L_ERROR, "got unknown transform value: %s", value);
}
}
} else if (strcmp(section, "cursor") == 0) {
if (strcmp(name, "map-to-output") == 0) {
config->cursor.mapped_output = strdup(value);
} else {
wlr_log(L_ERROR, "got unknown cursor config: %s", name);
}
} else {
wlr_log(L_ERROR, "got unknown config section: %s", section);
}
@ -128,6 +134,9 @@ void example_config_destroy(struct example_config *config) {
if (config->config_path) {
free(config->config_path);
}
if (config->cursor.mapped_output) {
free(config->cursor.mapped_output);
}
free(config);
}