diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-07 15:49:51 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-07 15:49:51 +1000 |
commit | 0046eed96903c745142208c40aa5f10d0b5931cb (patch) | |
tree | 2675baaf165acdfc7f8090f9a8750eb971535659 /sway/tree/view.c | |
parent | fc4ed6f037f28102921492ee0b0457771defa80f (diff) |
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/view.c')
-rw-r--r-- | sway/tree/view.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index e46cb327..3ef79fa8 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -923,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); |