Instead of checking if any of the window related enabled options are set
and updating the status-bar over and over again, delegate that job to a
small wrapper function.
}
void
+bar_check_opts(void)
+{
+ if (title_class_enabled || title_name_enabled || window_name_enabled)
+ bar_update();
+}
+
+void
bar_signal(int sig)
{
bar_alarm = 1;
PropModeReplace, (unsigned char *)&win->id,1);
}
- if (window_name_enabled || title_class_enabled || title_name_enabled)
- bar_update();
+ bar_check_opts();
}
void
done:
if (winfocus == winlostfocus || winfocus == NULL) {
/* update the bar so that title/class/name will be cleared. */
- if (window_name_enabled || title_name_enabled ||
- title_class_enabled)
- bar_update();
+ bar_check_opts();
return;
}
}
if (winfocus == winlostfocus || winfocus == NULL) {
/* update the bar so that title/class/name will be cleared. */
- if (window_name_enabled || title_name_enabled ||
- title_class_enabled)
- bar_update();
-
+ bar_check_opts();
return;
}