]> Pileus Git - wmpus/commitdiff
Fix get_next
authorAndy Spencer <andy753421@gmail.com>
Sun, 25 Sep 2011 07:35:42 +0000 (07:35 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sun, 25 Sep 2011 07:36:49 +0000 (07:36 +0000)
wm-wmii.c

index 5a814e3fb4095c10f0d0098604285ff6c0ea2bb4..9362ce477a1db2ef57404ed9f764c63c650dd902 100644 (file)
--- a/wm-wmii.c
+++ b/wm-wmii.c
@@ -5,7 +5,7 @@
 #include "sys.h"
 #include "wm.h"
 
-#define MODKEY alt
+#define MODKEY ctrl
 #define MARGIN 0
 #define STACK  25
 
@@ -198,9 +198,11 @@ static void shift_window(win_t *win, int col, int row)
 static list_t *get_next(list_t *list, int forward)
 {
        list_t *next = forward ? list->next : list->prev;
-       if (next == NULL)
-               while ((list = forward ? list->prev : list->next))
+       if (next == NULL) {
+               next = list;
+               while ((list = forward ? next->prev : next->next))
                        next = list;
+       }
        return next;
 }
 static void shift_focus(win_t *win, int col, int row)