From 5f0a4bb6a46cf359dd270e3c448ca1e112331f9d Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 16 Jul 2018 13:15:35 +1000 Subject: Update workspace urgent state when views close or move workspaces --- sway/tree/layout.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sway/tree/layout.c') 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, } } } + // Update workspace urgent state + struct sway_container *old_workspace = old_parent; + if (old_workspace->type != C_WORKSPACE) { + old_workspace = container_parent(old_workspace, C_WORKSPACE); + } + if (new_workspace != old_workspace) { + workspace_detect_urgent(new_workspace); + workspace_detect_urgent(old_workspace); + } } static bool sway_dir_to_wlr(enum movement_direction dir, @@ -548,6 +557,8 @@ void container_move(struct sway_container *container, } if (last_ws && next_ws && last_ws != next_ws) { ipc_event_workspace(last_ws, container, "focus"); + workspace_detect_urgent(last_ws); + workspace_detect_urgent(next_ws); } } -- cgit v1.2.3-54-g00ecf