aboutsummaryrefslogtreecommitdiff
path: root/dminiwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dminiwm.c')
-rw-r--r--dminiwm.c4
1 files 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