aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-16 13:15:35 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-16 13:15:35 +1000
commit5f0a4bb6a46cf359dd270e3c448ca1e112331f9d (patch)
treeb6f9df379c05b5a1bda6010c9e3bab5ef8f9dfb0 /sway/tree/layout.c
parentMake container_for_each_descendant_dfs descend into floating views (diff)
downloadsway-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/layout.c')
-rw-r--r--sway/tree/layout.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 54ddb3f9..197a2fc8 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -225,6 +225,15 @@ void container_move_to(struct sway_container *container,
225 } 225 }
226 } 226 }
227 } 227 }
228 // Update workspace urgent state
229 struct sway_container *old_workspace = old_parent;
230 if (old_workspace->type != C_WORKSPACE) {
231 old_workspace = container_parent(old_workspace, C_WORKSPACE);
232 }
233 if (new_workspace != old_workspace) {
234 workspace_detect_urgent(new_workspace);
235 workspace_detect_urgent(old_workspace);
236 }
228} 237}
229 238
230static bool sway_dir_to_wlr(enum movement_direction dir, 239static bool sway_dir_to_wlr(enum movement_direction dir,
@@ -548,6 +557,8 @@ void container_move(struct sway_container *container,
548 } 557 }
549 if (last_ws && next_ws && last_ws != next_ws) { 558 if (last_ws && next_ws && last_ws != next_ws) {
550 ipc_event_workspace(last_ws, container, "focus"); 559 ipc_event_workspace(last_ws, container, "focus");
560 workspace_detect_urgent(last_ws);
561 workspace_detect_urgent(next_ws);
551 } 562 }
552} 563}
553 564