aboutsummaryrefslogtreecommitdiffstats
path: root/sway/ipc-json.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-16 14:30:31 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-16 14:30:31 +1000
commitbe28c18ad5a3271aad537a5356662d57f16d9703 (patch)
tree3b83225ea6ccb895c7ac83e0f9f578317a88e3e0 /sway/ipc-json.c
parentUpdate workspace urgent state when views close or move workspaces (diff)
downloadsway-be28c18ad5a3271aad537a5356662d57f16d9703.tar.gz
sway-be28c18ad5a3271aad537a5356662d57f16d9703.tar.zst
sway-be28c18ad5a3271aad537a5356662d57f16d9703.zip
Mark containers as urgent in IPC if they have urgent views
Diffstat (limited to 'sway/ipc-json.c')
-rw-r--r--sway/ipc-json.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index dbab8e68..c49ea47e 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -198,10 +198,9 @@ static void ipc_json_describe_view(struct sway_container *c, json_object *object
198 json_object_new_string(ipc_json_layout_description(c->layout))); 198 json_object_new_string(ipc_json_layout_description(c->layout)));
199 } 199 }
200 200
201 if (c->type == C_VIEW) { 201 bool urgent = c->type == C_VIEW ?
202 json_object_object_add(object, "urgent", 202 view_is_urgent(c->sway_view) : container_has_urgent_child(c);
203 json_object_new_boolean(view_is_urgent(c->sway_view))); 203 json_object_object_add(object, "urgent", json_object_new_boolean(urgent));
204 }
205} 204}
206 205
207static void focus_inactive_children_iterator(struct sway_container *c, void *data) { 206static void focus_inactive_children_iterator(struct sway_container *c, void *data) {