}
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
winfocus = TAILQ_LAST(wl, ws_win_list);
if (winfocus == NULL || winfocus == win)
winfocus = TAILQ_NEXT(cur_focus, entry);
-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();
- return;
- }
+done:
focus_magic(winfocus);
}
default:
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();
-
- return;
- }
focus_magic(winfocus);
}
{
DNPRINTF(SWM_D_FOCUS, "focus_magic: window: 0x%lx\n", WINID(win));
- if (win == NULL)
+ if (win == NULL) {
+ /* if there are no windows clear the status-bar */
+ bar_check_opts();
return;
+ }
if (win->child_trans) {
/* win = parent & has a transient so focus on that */
if (win->child_trans->take_focus)
client_msg(win, takefocus);
} else {
- /* make sure transient hasn't dissapeared */
+ /* make sure transient hasn't disappeared */
if (validate_win(win->child_trans) == 0) {
focus_win(win->child_trans);
if (win->child_trans->take_focus)