aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-06-30 19:40:48 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-07-20 18:52:16 +0300
commite66d2f29bc5b29ceb88904fa693df2754a88220a (patch)
treee9dee1407523e96a29f7082963d3f9aa392fe366
parent00b154f690b5f40613b741e5b04d15a8a27ee7ec (diff)
rework next_win and prev_win functions - negate return conditional
-rw-r--r--monsterwm.c6
1 files 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