diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-11-28 21:41:58 -0500 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-11-28 21:41:58 -0500 |
commit | e62ab6ddbd89fd8ffebd8942601a2f55e159e2a3 (patch) | |
tree | dabb4c34a243e70ebaaa86d8bd9b779b2b422d56 /swaymsg | |
parent | Merge pull request #3216 from RedSoxFan/fix-empty-titlebars (diff) | |
download | sway-e62ab6ddbd89fd8ffebd8942601a2f55e159e2a3.tar.gz sway-e62ab6ddbd89fd8ffebd8942601a2f55e159e2a3.tar.zst sway-e62ab6ddbd89fd8ffebd8942601a2f55e159e2a3.zip |
swaymsg: parse success of single object
Allows swaymsg to parse the success attribute of a single object
response. This is needed for the subscribe event.
Diffstat (limited to 'swaymsg')
-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 | ||