aboutsummaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorChristoph Gysin <christoph.gysin@gmail.com>2015-11-29 23:17:42 +0200
committerChristoph Gysin <christoph.gysin@gmail.com>2015-11-29 23:17:55 +0200
commitae7ed795730398d50e6408575a1edfbd5c34bd3c (patch)
tree365d13bf0c0d8aae3aaec69bb6159ccd5cd91000 /sway/commands.c
parent82d464bb90af7fed57a36aacc2dce22994849bac (diff)
config: Store 'enabled' as int
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/commands.c b/sway/commands.c
index ba42a9ae..f891792f 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -719,7 +719,7 @@ static struct cmd_results *cmd_output(int argc, char **argv) {
struct output_config *output = calloc(1, sizeof(struct output_config));
output->x = output->y = output->width = output->height = -1;
output->name = strdup(name);
- output->enabled = true;
+ output->enabled = -1;
// TODO: atoi doesn't handle invalid numbers
// TODO: Check missing params after each sub-command
@@ -729,7 +729,7 @@ static struct cmd_results *cmd_output(int argc, char **argv) {
const char *command = argv[i];
if (strcasecmp(command, "disable") == 0) {
- output->enabled = false;
+ output->enabled = 0;
} else if (strcasecmp(command, "resolution") == 0 || strcasecmp(command, "res") == 0) {
char *res = argv[++i];
char *x = strchr(res, 'x');
@@ -811,8 +811,8 @@ static struct cmd_results *cmd_output(int argc, char **argv) {
}
list_add(config->output_configs, output);
- sway_log(L_DEBUG, "Config stored for output %s (%s) (%d x %d @ %d, %d) (bg %s %s)",
- output->name, output->enabled ? "enable" : "disable", output->width,
+ sway_log(L_DEBUG, "Config stored for output %s (enabled:%d) (%d x %d @ %d, %d) (bg %s %s)",
+ output->name, output->enabled, output->width,
output->height, output->x, output->y, output->background,
output->background_option);