X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=scrotwm.c;h=be3ba9071a7d3cb29cf0456fdddc0476c50ee4f0;hb=aff4537ab8b626dd4acfff07d0386b65f54eaef9;hp=712e5329e0849b5f522d55a7c1798dfee5669ad8;hpb=1ce688db7dd5ad4261c3e93bf89de132cd30bc3e;p=spectrwm.git diff --git a/scrotwm.c b/scrotwm.c index 712e532..be3ba90 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -1903,6 +1903,12 @@ focus_win(struct ws_win *win) XGetInputFocus(display, &cur_focus, &rr); if ((cfw = find_window(cur_focus)) != NULL) unfocus_win(cfw); + else { + /* use larger hammer since the window was killed somehow */ + TAILQ_FOREACH(cfw, &win->ws->winlist, entry) + XSetWindowBorder(display, cfw->id, + cfw->ws->r->s->c[SWM_S_COLOR_UNFOCUS].color); + } win->ws->focus = win;