From a7cda44d814729d4469234c9c6ca3d5e72947a4c Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Sat, 12 May 2012 22:05:21 +0100 Subject: [PATCH] Don't call the status-bar wrapper function. The update functions already check if the window related enabled options are set. Just call it directly, instead. As a consequence, the wrapper function can now be deleted. --- spectrwm.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/spectrwm.c b/spectrwm.c index 796153b..038b1b0 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -1500,13 +1500,6 @@ bar_update(void) } 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; @@ -2237,7 +2230,7 @@ focus_win(struct ws_win *win) PropModeReplace, (unsigned char *)&win->id, 1); } - bar_check_opts(); + bar_update(); } void @@ -6196,7 +6189,7 @@ focus_magic(struct ws_win *win) if (win == NULL) { /* if there are no windows clear the status-bar */ - bar_check_opts(); + bar_update(); return; } @@ -6609,12 +6602,8 @@ propertynotify(XEvent *e) X(win), Y(win), WIDTH(win), HEIGHT(win)); #endif case XA_WM_CLASS: - if (title_name_enabled || title_class_enabled) - bar_update(); - break; case XA_WM_NAME: - if (window_name_enabled) - bar_update(); + bar_update(); break; default: break; -- 1.7.10.4