X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2FWorkspace.cc;h=0a95c24f04e644a76d2f98cc2f59e69e41fc8995;hb=df7120d5ff0942dcae5a20bed79052e7be9bc1d1;hp=26b48e42f0f139055b0359f08f0b0ccdfc31d928;hpb=0326ac961fb82d8d7aab22e4da1859adeeceb2f7;p=chaz%2Fopenbox diff --git a/src/Workspace.cc b/src/Workspace.cc index 26b48e42..0a95c24f 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc @@ -91,6 +91,16 @@ void Workspace::addWindow(BlackboxWindow *w, bool place) { clientmenu->update(); screen->updateNetizenWindowAdd(w->getClientWindow(), id); + + if (id != screen->getCurrentWorkspaceID() && + screen->doFocusNew()) { + /* + not on the focused workspace, so the window is not going to get focus + but if the user wants new windows focused, then it should get focus + when this workspace does become focused. + */ + lastfocus = w; + } } if (! w->isDesktop())