aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/workspace.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/tree/workspace.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/tree/workspace.c')
-rw-r--r--sway/tree/workspace.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index d14f01eb..00b479ec 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -520,13 +520,8 @@ struct sway_container *workspace_output_get_highest_available(
520 return NULL; 520 return NULL;
521} 521}
522 522
523static bool find_urgent_iterator(struct sway_container *con,
524 void *data) {
525 return con->type == C_VIEW && view_is_urgent(con->sway_view);
526}
527
528void workspace_detect_urgent(struct sway_container *workspace) { 523void workspace_detect_urgent(struct sway_container *workspace) {
529 bool new_urgent = container_find(workspace, find_urgent_iterator, NULL); 524 bool new_urgent = container_has_urgent_child(workspace);
530 525
531 if (workspace->sway_workspace->urgent != new_urgent) { 526 if (workspace->sway_workspace->urgent != new_urgent) {
532 workspace->sway_workspace->urgent = new_urgent; 527 workspace->sway_workspace->urgent = new_urgent;