sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit e62ab6ddbd89fd8ffebd8942601a2f55e159e2a3
parent 9d18d81d484c0e6c5ee3638bc69f1dae53299ba4
Author: Brian Ashworth <bosrsf04@gmail.com>
Date:   Wed, 28 Nov 2018 21:41:58 -0500

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:
Mswaymsg/main.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git 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; }