- if (title_name_enabled) {
- /* add a colon if showing the class and something is focused */
- if (title_class_enabled && r != NULL && r->ws != NULL &&
- r->ws->focus != NULL)
- strlcat(fmtnew, ":", sz);
- strlcat(fmtnew, "+T ", sz);
+ /* checks needed by the colon and floating strlcat(3) calls below */
+ if (r != NULL && r->ws != NULL && r->ws->focus != NULL) {
+ if (title_name_enabled) {
+ if (title_class_enabled)
+ strlcat(fmtnew, ":", sz);
+ strlcat(fmtnew, "+T ", sz);
+ }
+ if (window_name_enabled) {
+ if (r->ws->focus->floating)
+ strlcat(fmtnew, "+F ", sz);
+ strlcat(fmtnew, "+64W ", sz);
+ }