+
+ if (!c->modal) {
+ if (c != selected) {
+ trans = g_list_concat(trans,
+ pick_windows(c, selected, raise));
+ } else {
+ g_assert(modal_sel_it == NULL);
+ g_assert(trans_sel_it == NULL);
+ trans_sel_it = pick_windows(c, selected, raise);
+ }
+ } else {
+ if (c != selected) {
+ modals = g_list_concat(modals,
+ pick_windows(c, selected, raise));
+ } else {
+ g_assert(modal_sel_it == NULL);
+ g_assert(trans_sel_it == NULL);
+ modal_sel_it = pick_windows(c, selected, raise);
+ }
+ }
+ /* if we dont have a prev then start back at the beginning,
+ otherwise skip back to the prev's next */
+ next = prev ? g_list_next(prev) : stacking_list;