diff options
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/container.c | 3 | ||||
-rw-r--r-- | sway/tree/view.c | 8 | ||||
-rw-r--r-- | sway/tree/workspace.c | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c index 3614d4e7..5fdcb6e3 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -151,6 +151,7 @@ void container_free(struct sway_container *cont) { return; } free(cont->name); + free(cont->formatted_title); wlr_texture_destroy(cont->title_focused); wlr_texture_destroy(cont->title_focused_inactive); wlr_texture_destroy(cont->title_unfocused); @@ -782,7 +783,7 @@ static void update_title_texture(struct sway_container *con, double scale = output->sway_output->wlr_output->scale; int width = 0; - int height = config->font_height * scale; + int height = con->title_height * scale; cairo_t *c = cairo_create(NULL); get_text_size(c, config->font, &width, NULL, scale, config->pango_markup, diff --git a/sway/tree/view.c b/sway/tree/view.c index 6b4daa82..3ef79fa8 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -514,7 +514,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface) { if (container_is_floating(focus)) { focus = focus->parent->parent; } - free(criterias); + list_free(criterias); cont = container_view_create(focus, view); view->surface = wlr_surface; @@ -574,6 +574,8 @@ void view_update_position(struct sway_view *view, double lx, double ly) { container_damage_whole(view->swayc); view->x = lx; view->y = ly; + view->swayc->current.view_x = lx; + view->swayc->current.view_y = ly; if (container_is_floating(view->swayc)) { container_set_geometry_from_floating_view(view->swayc); } @@ -587,6 +589,8 @@ void view_update_size(struct sway_view *view, int width, int height) { container_damage_whole(view->swayc); view->width = width; view->height = height; + view->swayc->current.view_width = width; + view->swayc->current.view_height = height; if (container_is_floating(view->swayc)) { container_set_geometry_from_floating_view(view->swayc); } @@ -919,7 +923,7 @@ static void update_marks_texture(struct sway_view *view, double scale = output->sway_output->wlr_output->scale; int width = 0; - int height = config->font_height * scale; + int height = view->swayc->title_height * scale; cairo_t *c = cairo_create(NULL); get_text_size(c, config->font, &width, NULL, scale, false, "%s", buffer); diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c index 2db06a31..51f0fcb4 100644 --- a/sway/tree/workspace.c +++ b/sway/tree/workspace.c @@ -191,6 +191,8 @@ char *workspace_next_name(const char *output_name) { free(target); target = _target; wlr_log(L_DEBUG, "Workspace: Found free name %s", _target); + } else { + free(_target); } } free(dup); |