aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Window.cc b/src/Window.cc
index 0d8b9e5..51b35d5 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -650,10 +650,13 @@ void FluxboxWindow::attachClient(WinClient &client, int x, int y) {
650 frame().clientArea().height()); 650 frame().clientArea().height());
651 651
652 // right now, this block only happens with new windows or on restart 652 // right now, this block only happens with new windows or on restart
653 if (screen().focusControl().focusNew() && 653 bool focus_new = screen().focusControl().focusNew();
654 !Fluxbox::instance()->isStartup()) 654 bool is_startup = Fluxbox::instance()->isStartup();
655 was_focused = true; 655
656 focused_win = screen().focusControl().focusNew() ? &client : m_client; 656 // we use m_focused as a signal to focus the window when mapped
657 if (focus_new && !is_startup)
658 m_focused = true;
659 focused_win = (focus_new || is_startup) ? &client : m_client;
657 660
658 client.saveBlackboxAttribs(m_blackbox_attrib); 661 client.saveBlackboxAttribs(m_blackbox_attrib);
659 m_clientlist.push_back(&client); 662 m_clientlist.push_back(&client);