From 7493785c1710ae5e2695b58e3c8e2f9f3f922140 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 20 Jul 2002 20:44:29 +0000 Subject: [PATCH] new windows on non-visible workspaces should follow the same focus rules as those on the visible workspace. if "Focus New Windows" is on, then they should get focus when the workspace becomes visible. --- src/Workspace.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) 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()) -- 2.39.2