Parse the title_format and display the customized window title if a format was set.

The format string set with "title_format" can contain the placeholder "%title" which will be replaced with the actual window title.

By not overwriting window->name itself, we make sure that assignment matching still works as expected.

fixes #1723
This commit is contained in:
Ingo Bürk
2015-06-10 19:01:05 +02:00
parent 55e8d06ee4
commit 5a8d66a1d5
6 changed files with 103 additions and 2 deletions

View File

@ -340,6 +340,18 @@ void set_font_colors(xcb_gcontext_t gc, uint32_t foreground, uint32_t background
}
}
/*
* Returns true if and only if the current font is a pango font.
*
*/
bool font_is_pango(void) {
#if PANGO_SUPPORT
return savedFont->type == FONT_TYPE_PANGO;
#else
return false;
#endif
}
static int predict_text_width_xcb(const xcb_char2b_t *text, size_t text_len);
static void draw_text_xcb(const xcb_char2b_t *text, size_t text_len, xcb_drawable_t drawable,