From 7230e8cbf224cd6993a9f714acda44ada29eb2bc Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Fri, 16 Oct 2009 04:40:05 +0000 Subject: [PATCH] more focus cleanz --- scrotwm.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/scrotwm.c b/scrotwm.c index d8e5d05..b0793f3 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -1657,11 +1657,10 @@ focus(struct swm_region *r, union arg *args) return; } - cur_focus = r->ws->focus; - if (cur_focus == NULL) { + if (r->ws->focus == NULL) return; - } + cur_focus = r->ws->focus; ws = r->ws; wl = &ws->winlist; @@ -1695,22 +1694,12 @@ focus(struct swm_region *r, union arg *args) } break; case SWM_ARG_ID_FOCUSNEXT: - cur_focus = r->ws->focus; - if (cur_focus == NULL) - return; - wl = &cur_focus->ws->winlist; - winfocus = TAILQ_NEXT(cur_focus, entry); if (winfocus == NULL) winfocus = TAILQ_FIRST(wl); break; case SWM_ARG_ID_FOCUSMAIN: - cur_focus = r->ws->focus; - if (cur_focus == NULL) - return; - wl = &cur_focus->ws->winlist; - winfocus = TAILQ_FIRST(wl); if (winfocus == cur_focus) winfocus = cur_focus->ws->focus_prev; -- 1.7.10.4