mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[window] When no window title set, handle this more gracefully
This commit is contained in:
parent
9fda280be1
commit
be4eeda3a5
1 changed files with 5 additions and 1 deletions
|
@ -356,7 +356,11 @@ static client *window_client(WindowModePrivateData *pd, xcb_window_t win) {
|
||||||
if (tmp_title == NULL) {
|
if (tmp_title == NULL) {
|
||||||
tmp_title = window_get_text_prop(c->window, XCB_ATOM_WM_NAME);
|
tmp_title = window_get_text_prop(c->window, XCB_ATOM_WM_NAME);
|
||||||
}
|
}
|
||||||
c->title = g_markup_escape_text(tmp_title, -1);
|
if ( tmp_title != NULL ) {
|
||||||
|
c->title = g_markup_escape_text(tmp_title, -1);
|
||||||
|
} else {
|
||||||
|
c->title = g_strdup("<i>no title set</i>");
|
||||||
|
}
|
||||||
pd->title_len =
|
pd->title_len =
|
||||||
MAX(c->title ? g_utf8_strlen(c->title, -1) : 0, pd->title_len);
|
MAX(c->title ? g_utf8_strlen(c->title, -1) : 0, pd->title_len);
|
||||||
g_free(tmp_title);
|
g_free(tmp_title);
|
||||||
|
|
Loading…
Reference in a new issue