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:
2020-10-02 01:50:37 +02:00
parent 764dbaa126
commit 4302fc4baf

View File

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