JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Fix erroneous keysym for flip_layout in the example key binding configurations.
[spectrwm.git] / scrotwm.c
index cba3e36..5757fc3 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -2538,13 +2538,8 @@ focus_prev(struct ws_win *win)
                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. */
-               bar_check_opts();
-               return;
-       }
 
+done:
        focus_magic(winfocus);
 }
 
@@ -2648,11 +2643,6 @@ focus(struct swm_region *r, union arg *args)
        default:
                return;
        }
-       if (winfocus == winlostfocus || winfocus == NULL) {
-               /* update the bar so that title/class/name will be cleared. */
-               bar_check_opts();
-               return;
-       }
 
        focus_magic(winfocus);
 }
@@ -5998,8 +5988,11 @@ focus_magic(struct ws_win *win)
 {
        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 */
@@ -6008,7 +6001,7 @@ focus_magic(struct ws_win *win)
                        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)