summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/tree/container.c10
-rw-r--r--sway/tree/view.c4
2 files changed, 12 insertions, 2 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 9e70da09..d0d26631 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -204,9 +204,17 @@ static struct sway_container *container_workspace_destroy(
204 } 204 }
205 } 205 }
206 206
207 free(workspace->sway_workspace); 207 struct sway_workspace *sway_workspace = workspace->sway_workspace;
208
209 // This emits the destroy event and also destroys the swayc.
208 _container_destroy(workspace); 210 _container_destroy(workspace);
209 211
212 // Clean up the floating container
213 sway_workspace->floating->parent = NULL;
214 _container_destroy(sway_workspace->floating);
215
216 free(sway_workspace);
217
210 if (output) { 218 if (output) {
211 output_damage_whole(output->sway_output); 219 output_damage_whole(output->sway_output);
212 } 220 }
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 79441d49..c9c82405 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -790,8 +790,10 @@ void view_update_title(struct sway_view *view, bool force) {
790 view->swayc->formatted_title = NULL; 790 view->swayc->formatted_title = NULL;
791 } 791 }
792 container_calculate_title_height(view->swayc); 792 container_calculate_title_height(view->swayc);
793 container_update_title_textures(view->swayc);
794 config_update_font_height(false); 793 config_update_font_height(false);
794
795 // Update title after the global font height is updated
796 container_update_title_textures(view->swayc);
795} 797}
796 798
797static bool find_by_mark_iterator(struct sway_container *con, 799static bool find_by_mark_iterator(struct sway_container *con,