X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=scrotwm.c;h=067806b64da2581e332852f94cc28cad90517515;hb=803efec3fdf794b4c3e923738a655c896d39cc6c;hp=dff399733968b5f8b220f89cbcd43f79e5fd45ae;hpb=7fb20ade540c0e3b03d32b0dea5dfc9970c80ea8;p=spectrwm.git diff --git a/scrotwm.c b/scrotwm.c index dff3997..067806b 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -52,7 +52,7 @@ static const char *cvstag = "$scrotwm$"; -#define SWM_VERSION "0.9.17" +#define SWM_VERSION "0.9.18" #include #include @@ -1389,17 +1389,18 @@ unfocus_win(struct ws_win *win) } void -unfocus_all(void) +unfocus_all_except(struct ws_win *except) { struct ws_win *win; int i, j; - DNPRINTF(SWM_D_FOCUS, "unfocus_all:\n"); + DNPRINTF(SWM_D_FOCUS, "unfocus_all_except: id: %lu\n", except->id); for (i = 0; i < ScreenCount(display); i++) for (j = 0; j < SWM_WS_MAX; j++) TAILQ_FOREACH(win, &screens[i].ws[j].winlist, entry) - unfocus_win(win); + if (win != except) + unfocus_win(win); } void @@ -1420,7 +1421,7 @@ focus_win(struct ws_win *win) } /* use big hammer to make sure it works under all use cases */ - unfocus_all(); + unfocus_all_except(win); if (validate_win(win)) { kill_refs(win);