libi3: Rework predict_text_width

predict_text_width now takes an i3String as argument
This commit is contained in:
Quentin Glidic
2012-08-07 22:30:37 +02:00
parent 53365fa887
commit 210fc6dfed
6 changed files with 24 additions and 27 deletions

View File

@ -119,7 +119,7 @@ void refresh_statusline() {
if (i3string_get_num_bytes(block->full_text) == 0)
continue;
block->width = predict_text_width((char *)i3string_as_ucs2(block->full_text), i3string_get_num_glyphs(block->full_text), true);
block->width = predict_text_width(block->full_text);
/* If this is not the last block, add some pixels for a separator. */
if (TAILQ_NEXT(block, blocks) != NULL)
block->width += 9;