rem: UpdateSwitchMenu(wwin->screen_ptr, wwin, ACTION_CHANGE_STATE);
add: WMPostNotificationName(WMNChangedFocus, wwin, (void*)True);
context: wWindowFocus(WWindow *wwin, WWindow *owin){    WWindow *nowner;    WWindow *oowner;#ifdef KEEP_XKB_LOCK_STATUS    if (wPreferences.modelock) {        XkbLockGroup(dpy, XkbUseCoreKbd, wwin->frame->languagemode);    }#endif /* KEEP_XKB_LOCK_STATUS */    wwin->flags.semi_focused = 0;    if (wwin->flags.is_gnustep == 0)      wFrameWindowChangeState(wwin->frame, WS_FOCUSED);    wwin->flags.focused = 1;    wWindowResetMouseGrabs(wwin);    UpdateSwitchMenu(wwin->screen_ptr, wwin, ACTION_CHANGE_STATE);    if (owin == wwin || !owin)	return;    nowner = wWindowFor(wwin->transient_for);    /* new window is a transient for the old window */    if (nowner == owin) {	owin->flags.semi_focused = 1;	wWindowUnfocus(nowner);	return;    }    oowner = wWindowFor(owin->transient_for);    /* new window is owner of old window */    if (wwin == oowner) {	wWindowUnfocus(owin);	return;    }    if (!nowner) {	wWindowUnfocus(owin);	return;    }    /* new window has same owner of old window */    if (oowner == nowner) {	/* prevent unfocusing of owner */	oowner->flags.semi_focused = 0;	wWindowUnfocus(owin);	oowner->flags.semi_focused = 1;	return;    }    /* nowner != NULL && oowner != nowner */    nowner->flags.semi_focused = 1;    wWindowUnfocus(nowner);    wWindowUnfocus(owin);}