summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2025-03-12 11:56:52 +0000
committerFurkan Sahin <furkan-dev@proton.me>2025-03-12 11:56:52 +0000
commit50dbd7b5c00a58dd49e821a9e344079c08e83bd8 (patch)
tree978dc27b667e2175a5a028a6c4e02dae4cda7a75
parentbcf7d32c119f6cd92ac7e6f385fd27c4dc660b0c (diff)
sway/commands: Return error if container is not in scratchpad
-rw-r--r--sway/commands/scratchpad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/commands/scratchpad.c b/sway/commands/scratchpad.c
index c995f2f0..8a63740c 100644
--- a/sway/commands/scratchpad.c
+++ b/sway/commands/scratchpad.c
@@ -118,10 +118,10 @@ struct cmd_results *cmd_scratchpad(int argc, char **argv) {
// If using criteria, this command is executed for every container which
// matches the criteria. If this container isn't in the scratchpad,
- // we'll just silently return a success. The same is true if the
+ // 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_SUCCESS, NULL);
+ return cmd_results_new(CMD_INVALID, "Container is not in scratchpad.");
}
scratchpad_toggle_container(con);
} else {