Do not default to off to dpms command

This commit is contained in:
Jason Nader 2021-11-18 23:16:48 +09:00
parent cbecc5cbae
commit 039c4346b1
No known key found for this signature in database
GPG key ID: EE220FCAA09AF23D

View file

@ -35,8 +35,11 @@ struct cmd_results *output_cmd_dpms(int argc, char **argv) {
if (parse_boolean(argv[0], current_dpms == DPMS_ON)) {
config->handler_context.output_config->dpms_state = DPMS_ON;
} else {
} else if (strcmp(argv[0], "off") == 0) {
config->handler_context.output_config->dpms_state = DPMS_OFF;
} else {
return cmd_results_new(CMD_INVALID,
"Invalid dpms argument: %s", argv[0]);
}
config->handler_context.leftovers.argc = argc - 1;