now jxplorer is correctly focussed when it is the nth window in the stack
when created
if (cur_focus == win)
winfocus = TAILQ_PREV(win, ws_win_list, entry);
if (winfocus == NULL)
if (cur_focus == win)
winfocus = TAILQ_PREV(win, ws_win_list, entry);
if (winfocus == NULL)
- winfocus = TAILQ_FIRST(wl);
+ winfocus = TAILQ_LAST(wl, ws_win_list);
if (winfocus == NULL || winfocus == win)
winfocus = TAILQ_NEXT(cur_focus, entry);
done:
if (winfocus == NULL || winfocus == win)
winfocus = TAILQ_NEXT(cur_focus, entry);
done: