From: Andy Spencer Date: Sun, 25 Sep 2011 07:35:42 +0000 (+0000) Subject: Fix get_next X-Git-Url: http://pileus.org/git/?p=wmpus;a=commitdiff_plain;h=c8fbd497f0c6b24ece62a771b238666b87c69261 Fix get_next --- 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)