diff options
Diffstat (limited to 'sway/commands/seat')
-rw-r--r-- | sway/commands/seat/fallback.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sway/commands/seat/fallback.c b/sway/commands/seat/fallback.c index 11f5a08c..a0ddf3ef 100644 --- a/sway/commands/seat/fallback.c +++ b/sway/commands/seat/fallback.c @@ -3,6 +3,7 @@ #include "sway/config.h" #include "sway/commands.h" #include "sway/input/input-manager.h" +#include "util.h" struct cmd_results *seat_cmd_fallback(int argc, char **argv) { struct cmd_results *error = NULL; @@ -16,16 +17,8 @@ struct cmd_results *seat_cmd_fallback(int argc, char **argv) { } struct seat_config *new_config = new_seat_config(current_seat_config->name); - - if (strcasecmp(argv[0], "true") == 0) { - new_config->fallback = 1; - } else if (strcasecmp(argv[0], "false") == 0) { - new_config->fallback = 0; - } else { - free_seat_config(new_config); - return cmd_results_new(CMD_INVALID, "fallback", - "Expected 'fallback <true|false>'"); - } + + new_config->fallback = parse_boolean(argv[0], false); if (!config->validating) { apply_seat_config(new_config); |