From 7ea864115531030a31526d0f1db473fb87755456 Mon Sep 17 00:00:00 2001 From: "Rene D. Obermueller" Date: Sun, 4 May 2025 13:25:42 +0200 Subject: [PATCH] container not in scratchpad: return CMD_FAILURE Closes #8696. This was changed to CMD_INVALID in #8615, but for a scenario where there are criteria matched containers both inside and outside scratchpad, the container in scratchpad can no longer be shown via "[] scratchpad show". Changing it to CMD_FAILURE still leads to an error message and exit code 2, but scratchpad show works again. --- sway/commands/scratchpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/commands/scratchpad.c b/sway/commands/scratchpad.c index 8a63740c3..80318053c 100644 --- a/sway/commands/scratchpad.c +++ b/sway/commands/scratchpad.c @@ -121,7 +121,7 @@ struct cmd_results *cmd_scratchpad(int argc, char **argv) { // we'll return an error. The same is true if the // overridden node is not a container. if (!con || !con->scratchpad) { - return cmd_results_new(CMD_INVALID, "Container is not in scratchpad."); + return cmd_results_new(CMD_FAILURE, "Container is not in scratchpad."); } scratchpad_toggle_container(con); } else {