X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=scrotwm.c;h=634e08b27d142c7589a71681197c5831cab6a4b2;hb=0266c3c6c39b5f188424ee41d6df07a53b53a7da;hp=da457258877fc1abf38bfaa3f7da3f8cac75b1ef;hpb=762accdc0274dbd63c05d1163b5856b2d7226654;p=spectrwm.git diff --git a/scrotwm.c b/scrotwm.c index da45725..634e08b 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -1288,6 +1288,10 @@ focus(struct swm_region *r, union arg *args) case SWM_ARG_ID_FOCUSMAIN: winfocus = TAILQ_FIRST(wl); + if (winfocus == cur_focus) + winfocus = cur_focus->ws->focus_prev; + if (winfocus == NULL) + return; break; default: