aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/container.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-07 15:49:51 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-07-07 15:49:51 +1000
commit0046eed96903c745142208c40aa5f10d0b5931cb (patch)
tree2675baaf165acdfc7f8090f9a8750eb971535659 /sway/tree/container.c
parentMerge pull request #2196 from emersion/xwayland-floating-resize (diff)
downloadsway-0046eed96903c745142208c40aa5f10d0b5931cb.tar.gz
sway-0046eed96903c745142208c40aa5f10d0b5931cb.tar.zst
sway-0046eed96903c745142208c40aa5f10d0b5931cb.zip
Fix titles when container titles contain UTF-8 characters
The title and marks textures would have their height set from the config's computed max font height, but the textures were not regenerated when the config's max font height changed which made a gap appear. Rather than making it regenerate the title textures every time the config font height was changed, I've changed it to just make the textures the height of the title itself and fill any gap when rendering. Also, the title_width and marks_width variables have been renamed to make it more obvious that they are in output-buffer-local coordinates. Fixes #1936.
Diffstat (limited to 'sway/tree/container.c')
-rw-r--r--sway/tree/container.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 9093feba..5fdcb6e3 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -783,7 +783,7 @@ static void update_title_texture(struct sway_container *con,
783 783
784 double scale = output->sway_output->wlr_output->scale; 784 double scale = output->sway_output->wlr_output->scale;
785 int width = 0; 785 int width = 0;
786 int height = config->font_height * scale; 786 int height = con->title_height * scale;
787 787
788 cairo_t *c = cairo_create(NULL); 788 cairo_t *c = cairo_create(NULL);
789 get_text_size(c, config->font, &width, NULL, scale, config->pango_markup, 789 get_text_size(c, config->font, &width, NULL, scale, config->pango_markup,