From 43146fd86cca51623e788252ccd4f09c81e958b8 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Sun, 11 Dec 2011 19:41:21 +0200 Subject: do not try next or prev window if no other window is open --- dminiwm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dminiwm.c b/dminiwm.c index 91cdc2d..dc310c0 100644 --- a/dminiwm.c +++ b/dminiwm.c @@ -220,13 +220,13 @@ void killclient() { } void next_win() { - if(current == NULL || head == NULL) return; + if(current == NULL || head == NULL || (current == head && current->next == NULL)) return; current = (current->next == NULL) ? head : current->next; update_current(); } void prev_win() { - if(current == NULL || head == NULL) return; + if(current == NULL || head == NULL || (current == head && current->next == NULL)) return; if(current->prev == NULL) /* if(current == head) */ for(current=head; current->next; current=current->next); else -- cgit v1.3.1