aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--swaymsg/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c
index 3e61b94..c9c557d 100644
--- a/swaymsg/main.c
+++ b/swaymsg/main.c
@@ -32,6 +32,9 @@ static bool success_object(json_object *result) {
// Iterate results array and return false if any of them failed
static bool success(json_object *r, bool fallback) {
if (!json_object_is_type(r, json_type_array)) {
+ if (json_object_is_type(r, json_type_object)) {
+ return success_object(r);
+ }
return fallback;
}