if (!other_r) {
/* if the other workspace is hidden, switch windows */
/* map new window first to prevent ugly blinking */
if (!other_r) {
/* if the other workspace is hidden, switch windows */
/* map new window first to prevent ugly blinking */
TAILQ_FOREACH(win, &new_ws->winlist, entry)
XMapRaised(display, win->id);
TAILQ_FOREACH(win, &old_ws->winlist, entry)
XUnmapWindow(display, win->id);
TAILQ_FOREACH(win, &new_ws->winlist, entry)
XMapRaised(display, win->id);
TAILQ_FOREACH(win, &old_ws->winlist, entry)
XUnmapWindow(display, win->id);
/* find a window to focus */
if (ws->focus == win)
ws->focus = TAILQ_PREV(win, ws_win_list, entry);
/* find a window to focus */
if (ws->focus == win)
ws->focus = TAILQ_PREV(win, ws_win_list, entry);