From 3bb8cd62a46b50506c60e6371785b97eef3b3842 Mon Sep 17 00:00:00 2001 From: Ricardo Steijn Date: Sat, 13 Jul 2024 21:15:41 +0200 Subject: [PATCH] fix: allow use of the toggle argument for output allow_tearing --- sway/commands/output/allow_tearing.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sway/commands/output/allow_tearing.c b/sway/commands/output/allow_tearing.c index 268f9d633..9a183b96c 100644 --- a/sway/commands/output/allow_tearing.c +++ b/sway/commands/output/allow_tearing.c @@ -10,7 +10,8 @@ struct cmd_results *output_cmd_allow_tearing(int argc, char **argv) { return cmd_results_new(CMD_INVALID, "Missing allow_tearing argument"); } - if (parse_boolean(argv[0], true)) { + if (parse_boolean(argv[0], + (config->handler_context.output_config->allow_tearing == 1))) { config->handler_context.output_config->allow_tearing = 1; } else { config->handler_context.output_config->allow_tearing = 0;