From aff4537ab8b626dd4acfff07d0386b65f54eaef9 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Mon, 13 Jun 2011 21:51:47 +0000 Subject: [PATCH] prevent double red bordering --- scrotwm.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- 1.7.10.4