aboutsummaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorD.B <thejan.2009@gmail.com>2016-10-07 11:27:06 +0200
committerD.B <thejan.2009@gmail.com>2016-10-07 11:27:06 +0200
commit6f2c39610e951b76ff3cc2796c7bd7d3df2d7ba7 (patch)
tree7fa83cd7b67b7ae3cece083580ac2d6035ae4acd /swaybar
parentfa119661e9efeeb82d2efc1d962fbaddb9f49a3c (diff)
downloadsway-6f2c39610e951b76ff3cc2796c7bd7d3df2d7ba7.tar.xz
parse pango markup in workspace names (and bugfix)
This change allows using numeric character references in workspace names - for example &#230; which stands for sharp s. A fix was necessary in get_pango_layout, since markup and parsed markup had different width.
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/render.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/swaybar/render.c b/swaybar/render.c
index a773df7b..7dfac891 100644
--- a/swaybar/render.c
+++ b/swaybar/render.c
@@ -205,7 +205,7 @@ void workspace_button_size(struct window *window, const char *workspace_name, in
const char *stripped_name = strip_workspace_name(swaybar.config->strip_workspace_numbers, workspace_name);
get_text_size(window->cairo, window->font, width, height,
- window->scale, false, "%s", stripped_name);
+ window->scale, true, "%s", stripped_name);
*width += 2 * ws_horizontal_padding;
*height += 2 * ws_vertical_padding;
}
@@ -241,7 +241,7 @@ static void render_workspace_button(struct window *window, struct config *config
cairo_set_source_u32(window->cairo, box_colors.text);
cairo_move_to(window->cairo, (int)*x + ws_horizontal_padding, margin);
pango_printf(window->cairo, window->font, window->scale,
- false, "%s", stripped_name);
+ true, "%s", stripped_name);
*x += width + ws_spacing;
}