aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Window.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 41628f2..d5f75e1 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -669,9 +669,10 @@ void FluxboxWindow::attachClient(WinClient &client, int x, int y) {
669 setCurrentClient(client); 669 setCurrentClient(client);
670 FocusControl::setFocusedWindow(&client); 670 FocusControl::setFocusedWindow(&client);
671 } else { 671 } else {
672 WinClient *last = screen().focusControl().lastFocusedWindow(*this); 672 if (!focused_win)
673 if (last) 673 focused_win = screen().focusControl().lastFocusedWindow(*this);
674 setCurrentClient(*last, false); 674 if (focused_win)
675 setCurrentClient(*focused_win, false);
675 } 676 }
676 frame().reconfigure(); 677 frame().reconfigure();
677} 678}