diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2011-12-11 19:41:21 +0200 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2011-12-11 19:41:21 +0200 |
| commit | 43146fd86cca51623e788252ccd4f09c81e958b8 (patch) | |
| tree | 95a928b69e9adc04f372731ec265bd81f6cac6ef /dminiwm.c | |
| parent | e3124ab1ed785db319492fdf7b573f503f7aedd0 (diff) | |
do not try next or prev window if no other window is open
Diffstat (limited to 'dminiwm.c')
| -rw-r--r-- | dminiwm.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |
