diff options
author | Simon Ser <contact@emersion.fr> | 2022-06-23 21:03:32 +0200 |
---|---|---|
committer | Kirill Primak <vyivel@eclair.cafe> | 2022-07-04 21:58:24 +0300 |
commit | b69d637f7a34e239e48a4267ae94a5e7087b5834 (patch) | |
tree | 63e33a9a15a08c5ebe9bf68183a10bad86997ce7 /sway/commands/output | |
parent | 798e3c8858fdddb0e548d649cc61b6777565de98 (diff) |
Remove internal references to DPMS
While at it, use an int for the config field, just like we do for
all other fields.
Diffstat (limited to 'sway/commands/output')
-rw-r--r-- | sway/commands/output/power.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/commands/output/power.c b/sway/commands/output/power.c index c783e69b..e6ae2852 100644 --- a/sway/commands/output/power.c +++ b/sway/commands/output/power.c @@ -12,7 +12,7 @@ struct cmd_results *output_cmd_power(int argc, char **argv) { return cmd_results_new(CMD_INVALID, "Missing power argument"); } - enum config_dpms current_dpms = DPMS_ON; + bool current = true; if (strcasecmp(argv[0], "toggle") == 0) { const char *oc_name = config->handler_context.output_config->name; if (strcmp(oc_name, "*") == 0) { @@ -27,14 +27,14 @@ struct cmd_results *output_cmd_power(int argc, char **argv) { } if (sway_output->enabled && !sway_output->wlr_output->enabled) { - current_dpms = DPMS_OFF; + current = false; } } - if (parse_boolean(argv[0], current_dpms == DPMS_ON)) { - config->handler_context.output_config->dpms_state = DPMS_ON; + if (parse_boolean(argv[0], current)) { + config->handler_context.output_config->power = 1; } else { - config->handler_context.output_config->dpms_state = DPMS_OFF; + config->handler_context.output_config->power = 0; } config->handler_context.leftovers.argc = argc - 1; |