diff options
author | emersion <contact@emersion.fr> | 2018-11-29 09:10:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-29 09:10:00 +0100 |
commit | fd37ded3a317d516bafdb92ec8fc1408892f480c (patch) | |
tree | 7740a37da575724b92fdec9ac464796717c641aa /swaymsg/main.c | |
parent | Merge pull request #3218 from johnae/master (diff) | |
parent | swaymsg: parse success of single object (diff) | |
download | sway-fd37ded3a317d516bafdb92ec8fc1408892f480c.tar.gz sway-fd37ded3a317d516bafdb92ec8fc1408892f480c.tar.zst sway-fd37ded3a317d516bafdb92ec8fc1408892f480c.zip |
Merge pull request #3219 from RedSoxFan/swaymsg-object-success1.0-beta.2
swaymsg: parse success of single object
Diffstat (limited to 'swaymsg/main.c')
-rw-r--r-- | swaymsg/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/swaymsg/main.c b/swaymsg/main.c index 3e61b94a..c9c557da 100644 --- a/swaymsg/main.c +++ b/swaymsg/main.c | |||
@@ -32,6 +32,9 @@ static bool success_object(json_object *result) { | |||
32 | // Iterate results array and return false if any of them failed | 32 | // Iterate results array and return false if any of them failed |
33 | static bool success(json_object *r, bool fallback) { | 33 | static bool success(json_object *r, bool fallback) { |
34 | if (!json_object_is_type(r, json_type_array)) { | 34 | if (!json_object_is_type(r, json_type_array)) { |
35 | if (json_object_is_type(r, json_type_object)) { | ||
36 | return success_object(r); | ||
37 | } | ||
35 | return fallback; | 38 | return fallback; |
36 | } | 39 | } |
37 | 40 | ||