diff options
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index ae520b07..b5b73408 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -595,16 +595,21 @@ void view_unmap(struct sway_view *view) { | |||
595 | view->urgent_timer = NULL; | 595 | view->urgent_timer = NULL; |
596 | } | 596 | } |
597 | 597 | ||
598 | struct sway_container *parent; | ||
599 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); | ||
600 | |||
598 | if (view->is_fullscreen) { | 601 | if (view->is_fullscreen) { |
599 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); | ||
600 | ws->sway_workspace->fullscreen = NULL; | 602 | ws->sway_workspace->fullscreen = NULL; |
601 | container_destroy(view->swayc); | 603 | parent = container_destroy(view->swayc); |
602 | 604 | ||
603 | arrange_windows(ws->parent); | 605 | arrange_windows(ws->parent); |
604 | } else { | 606 | } else { |
605 | struct sway_container *parent = container_destroy(view->swayc); | 607 | struct sway_container *parent = container_destroy(view->swayc); |
606 | arrange_windows(parent); | 608 | arrange_windows(parent); |
607 | } | 609 | } |
610 | if (parent->type >= C_WORKSPACE) { // if the workspace still exists | ||
611 | workspace_detect_urgent(ws); | ||
612 | } | ||
608 | transaction_commit_dirty(); | 613 | transaction_commit_dirty(); |
609 | view->surface = NULL; | 614 | view->surface = NULL; |
610 | } | 615 | } |
@@ -1073,7 +1078,7 @@ void view_set_urgent(struct sway_view *view, bool enable) { | |||
1073 | ipc_event_window(view->swayc, "urgent"); | 1078 | ipc_event_window(view->swayc, "urgent"); |
1074 | 1079 | ||
1075 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); | 1080 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); |
1076 | ipc_event_workspace(NULL, ws, "urgent"); | 1081 | workspace_detect_urgent(ws); |
1077 | } | 1082 | } |
1078 | 1083 | ||
1079 | bool view_is_urgent(struct sway_view *view) { | 1084 | bool view_is_urgent(struct sway_view *view) { |