From e66d2f29bc5b29ceb88904fa693df2754a88220a Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Sat, 30 Jun 2012 19:40:48 +0300 Subject: rework next_win and prev_win functions - negate return conditional --- monsterwm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/monsterwm.c b/monsterwm.c index c3dff0a..af40066 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -660,8 +660,7 @@ void moveresize(const Arg *arg) { /* cyclic focus the next window * if the window is the last on stack, focus head */ void next_win(void) { - if (!curr || !head->next) return; - focus(curr->next ? curr->next:head); + if (curr && head->next) focus(curr->next ? curr->next:head); } /* get the previous client from the given @@ -675,8 +674,7 @@ Client* prevclient(Client *c) { /* cyclic focus the previous window * if the window is the head, focus the last stack window */ void prev_win(void) { - if (!curr || !head->next) return; - focus(prevclient(prev = curr)); + if (curr && head->next) focus(prevclient(prev = curr)); } /* property notify is called when one of the window's properties -- cgit v1.3.1