rem: if (!foc && !WFLAGP(tmp, no_focusable)) foc = tmp;
add: if (!foc && !WFLAGP(tmp, no_focusable)) { foc = tmp; }
context: wWorkspaceForceChange(WScreen *scr, int workspace){    WWindow *tmp, *foc=NULL, *foc2=NULL;    if (workspace >= MAX_WORKSPACES || workspace < 0)	return;    SendHelperMessage(scr, 'C', workspace+1, NULL);    if (workspace > scr->workspace_count-1) {	wWorkspaceMake(scr, workspace - scr->workspace_count + 1);    }    wClipUpdateForWorkspaceChange(scr, workspace);    scr->current_workspace = workspace;    wWorkspaceMenuUpdate(scr, scr->workspace_menu);    wWorkspaceMenuUpdate(scr, scr->clip_ws_menu);    if ((tmp = scr->focused_window)!= NULL) {        if ((IS_OMNIPRESENT(tmp) && (tmp->flags.mapped || tmp->flags.shaded)             && !WFLAGP(tmp, no_focusable))            || tmp->flags.changing_workspace) {	    foc = tmp;	}	/* foc2 = tmp; will fix annoyance with gnome panel	 * but will create annoyance for every other application	 */	while (tmp) {	    if (tmp->frame->workspace!=workspace && !tmp->flags.selected) {		/* unmap windows not on this workspace */		if ((tmp->flags.mapped||tmp->flags.shaded)		    && !IS_OMNIPRESENT(tmp)		    && !tmp->flags.changing_workspace) {		    wWindowUnmap(tmp);		}                /* also unmap miniwindows not on this workspace */                if (!wPreferences.sticky_icons && tmp->flags.miniaturized &&                    tmp->icon && !IS_OMNIPRESENT(tmp)) {                    XUnmapWindow(dpy, tmp->icon->core->window);                    tmp->icon->mapped = 0;                }		/* update current workspace of omnipresent windows */                if (IS_OMNIPRESENT(tmp)) {		    WApplication *wapp = wApplicationOf(tmp->main_window);		    tmp->frame->workspace = workspace;		    if (wapp) {			wapp->last_workspace = workspace;		    }		    if (!foc2 && (tmp->flags.mapped || tmp->flags.shaded))			foc2 = tmp;		}            } else {		/* change selected windows' workspace */		if (tmp->flags.selected) {		    wWindowChangeWorkspace(tmp, workspace);                    if (!tmp->flags.miniaturized && !foc) {                        foc = tmp;                    }                } else {		    if (!tmp->flags.hidden) {			if (!(tmp->flags.mapped || tmp->flags.miniaturized)) {			    /* remap windows that are on this workspace */			    wWindowMap(tmp);			    if (!foc && !WFLAGP(tmp, no_focusable))				foc = tmp;			}			/* Also map miniwindow if not omnipresent */			if (!wPreferences.sticky_icons &&			    tmp->flags.miniaturized &&			    !IS_OMNIPRESENT(tmp) && tmp->icon) {			    tmp->icon->mapped = 1;			    XMapWindow(dpy, tmp->icon->core->window);			}		    }                }	    }	    tmp = tmp->prev;	}	if (!foc)	    foc = foc2;	if (scr->focused_window->flags.mapped && !foc) {	    foc = scr->focused_window;	}	if (wPreferences.focus_mode == WKF_CLICK) {	    wSetFocusTo(scr, foc);	} else {            unsigned int mask;            int foo;            Window bar, win;	    WWindow *tmp;	    tmp = NULL;            if (XQueryPointer(dpy, scr->root_win, &bar, &win,                              &foo, &foo, &foo, &foo, &mask)) {		tmp = wWindowFor(win);	    }	    if (!tmp && wPreferences.focus_mode == WKF_SLOPPY) {		wSetFocusTo(scr, foc);	    } else {		wSetFocusTo(scr, tmp);	    }	}    }    /* We need to always arrange icons when changing workspace, even if     * no autoarrange icons, because else the icons in different workspaces     * can be superposed.     * This can be avoided if appicons are also workspace specific.     */    if (!wPreferences.sticky_icons)        wArrangeIcons(scr, False);    if (scr->dock)        wAppIconPaint(scr->dock->icon_array[0]);    if (scr->clip_icon) {        if (scr->workspaces[workspace]->clip->auto_collapse ||            scr->workspaces[workspace]->clip->auto_raise_lower) {            /* to handle enter notify. This will also */            XUnmapWindow(dpy, scr->clip_icon->icon->core->window);            XMapWindow(dpy, scr->clip_icon->icon->core->window);        } else {            wClipIconPaint(scr->clip_icon);        }    }#ifdef KWM_HINTS    wScreenUpdateUsableArea(scr);#endif    showWorkspaceName(scr, workspace);    WMPostNotificationName(WMNWorkspaceChanged, scr, (void*)workspace);/*   XSync(dpy, False); */}