aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-02-18 15:25:48 -0500
committerGitHub <noreply@github.com>2019-02-18 15:25:48 -0500
commitcb49b0f6a4d5e472b89a9cd1f31f2d43ae54f268 (patch)
treece61ac3af3910808b835571ec1243175738f40e5
parenta1e171080d57d4dfda7fd793137620060d041667 (diff)
parentfc397f52bbbeca3ef078ae290257329404207071 (diff)
Merge pull request #3715 from yorickvP/ipc-visible
Feature: Add 'visible' key to view json response
-rw-r--r--sway/ipc-json.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index 23016dbd..6d36c727 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -344,6 +344,9 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
json_object_object_add(object, "app_id",
app_id ? json_object_new_string(app_id) : NULL);
+ bool visible = view_is_visible(c->view);
+ json_object_object_add(object, "visible", json_object_new_boolean(visible));
+
json_object *marks = json_object_new_array();
list_t *con_marks = c->marks;
for (int i = 0; i < con_marks->length; ++i) {