diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-16 13:15:35 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-16 13:15:35 +1000 |
commit | 5f0a4bb6a46cf359dd270e3c448ca1e112331f9d (patch) | |
tree | b6f9df379c05b5a1bda6010c9e3bab5ef8f9dfb0 /sway/tree/workspace.c | |
parent | Make container_for_each_descendant_dfs descend into floating views (diff) | |
download | sway-5f0a4bb6a46cf359dd270e3c448ca1e112331f9d.tar.gz sway-5f0a4bb6a46cf359dd270e3c448ca1e112331f9d.tar.zst sway-5f0a4bb6a46cf359dd270e3c448ca1e112331f9d.zip |
Update workspace urgent state when views close or move workspaces
Diffstat (limited to 'sway/tree/workspace.c')
-rw-r--r-- | sway/tree/workspace.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index d71b0a53..d14f01eb 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c | |||
@@ -525,6 +525,11 @@ static bool find_urgent_iterator(struct sway_container *con, | |||
525 | return con->type == C_VIEW && view_is_urgent(con->sway_view); | 525 | return con->type == C_VIEW && view_is_urgent(con->sway_view); |
526 | } | 526 | } |
527 | 527 | ||
528 | bool workspace_is_urgent(struct sway_container *workspace) { | 528 | void workspace_detect_urgent(struct sway_container *workspace) { |
529 | return container_find(workspace, find_urgent_iterator, NULL); | 529 | bool new_urgent = container_find(workspace, find_urgent_iterator, NULL); |
530 | |||
531 | if (workspace->sway_workspace->urgent != new_urgent) { | ||
532 | workspace->sway_workspace->urgent = new_urgent; | ||
533 | ipc_event_workspace(NULL, workspace, "urgent"); | ||
534 | } | ||
530 | } | 535 | } |