mirror of
https://github.com/swaywm/sway.git
synced 2025-11-09 13:29:49 -05:00
Update workspace urgent state when views close or move workspaces
This commit is contained in:
parent
560627437b
commit
5f0a4bb6a4
6 changed files with 31 additions and 7 deletions
|
|
@ -595,16 +595,21 @@ void view_unmap(struct sway_view *view) {
|
|||
view->urgent_timer = NULL;
|
||||
}
|
||||
|
||||
struct sway_container *parent;
|
||||
struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
|
||||
|
||||
if (view->is_fullscreen) {
|
||||
struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
|
||||
ws->sway_workspace->fullscreen = NULL;
|
||||
container_destroy(view->swayc);
|
||||
parent = container_destroy(view->swayc);
|
||||
|
||||
arrange_windows(ws->parent);
|
||||
} else {
|
||||
struct sway_container *parent = container_destroy(view->swayc);
|
||||
arrange_windows(parent);
|
||||
}
|
||||
if (parent->type >= C_WORKSPACE) { // if the workspace still exists
|
||||
workspace_detect_urgent(ws);
|
||||
}
|
||||
transaction_commit_dirty();
|
||||
view->surface = NULL;
|
||||
}
|
||||
|
|
@ -1073,7 +1078,7 @@ void view_set_urgent(struct sway_view *view, bool enable) {
|
|||
ipc_event_window(view->swayc, "urgent");
|
||||
|
||||
struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE);
|
||||
ipc_event_workspace(NULL, ws, "urgent");
|
||||
workspace_detect_urgent(ws);
|
||||
}
|
||||
|
||||
bool view_is_urgent(struct sway_view *view) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue