aboutsummaryrefslogtreecommitdiff
path: root/rootston/config.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-01-15 20:53:13 -0500
committerGitHub <noreply@github.com>2018-01-15 20:53:13 -0500
commitb331c5c2c5cbb94df66789e52ab87598647e0056 (patch)
tree24be1a00880947a25b9f9f8a12129bbb371b1643 /rootston/config.c
parentc690420501a35ee83bf6afeb52139b3da2c455c2 (diff)
parent0eebaf98d0550a9ea7adb743a5b85634f1d76b73 (diff)
Merge pull request #549 from emersion/output-enabled
Add wlr_output::enabled
Diffstat (limited to 'rootston/config.c')
-rw-r--r--rootston/config.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/rootston/config.c b/rootston/config.c
index f9fde369..31bde2b0 100644
--- a/rootston/config.c
+++ b/rootston/config.c
@@ -263,10 +263,19 @@ static int config_ini_handler(void *user, const char *section, const char *name,
oc->name = strdup(output_name);
oc->transform = WL_OUTPUT_TRANSFORM_NORMAL;
oc->scale = 1;
+ oc->enable = true;
wl_list_insert(&config->outputs, &oc->link);
}
- if (strcmp(name, "x") == 0) {
+ if (strcmp(name, "enable") == 0) {
+ if (strcasecmp(value, "true") == 0) {
+ oc->enable = true;
+ } else if (strcasecmp(value, "false") == 0) {
+ oc->enable = false;
+ } else {
+ wlr_log(L_ERROR, "got invalid output enable value: %s", value);
+ }
+ } else if (strcmp(name, "x") == 0) {
oc->x = strtol(value, NULL, 10);
} else if (strcmp(name, "y") == 0) {
oc->y = strtol(value, NULL, 10);