Use an empty string rather than "broken"

If we fail to retrieve the title, then there is no title,
though this doesn't mean the same as "no window",
for which we have NULL.
This commit is contained in:
Přemysl Eric Janouch 2020-10-02 01:50:37 +02:00
parent 764dbaa126
commit 4302fc4baf
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -303,7 +303,7 @@ x_window_title(xcb_window_t window)
GString *title;
if (!(title = x_text_property(window, gen.atom_net_wm_name))
&& !(title = x_text_property(window, XCB_ATOM_WM_NAME)))
return g_strdup("broken");
return g_strdup("");
return g_string_free(title, false);
}