From c8fbd497f0c6b24ece62a771b238666b87c69261 Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Sun, 25 Sep 2011 07:35:42 +0000 Subject: [PATCH] Fix get_next --- wm-wmii.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wm-wmii.c b/wm-wmii.c index 5a814e3..9362ce4 100644 --- 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) -- 2.43.2