From 0266c3c6c39b5f188424ee41d6df07a53b53a7da Mon Sep 17 00:00:00 2001 From: Ryan McBride Date: Fri, 13 Feb 2009 00:47:21 +0000 Subject: [PATCH] If the master window already has focus when M-m is pressed, switch focus back to the previously focused window, to match the behaviour of M-enter. Pointed out by jacekm@. --- scrotwm.c | 4 ++++ 1 file changed, 4 insertions(+) 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: -- 1.7.10.4