From 4e0eb904385b06271e0a41b1e46bcc2d94bc2896 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 23 May 2007 16:05:41 +0000 Subject: little fix for focusing auto-grouped windows --- src/Window.cc | 11 +++++++---- 1 file 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) { frame().clientArea().height()); // right now, this block only happens with new windows or on restart - if (screen().focusControl().focusNew() && - !Fluxbox::instance()->isStartup()) - was_focused = true; - focused_win = screen().focusControl().focusNew() ? &client : m_client; + bool focus_new = screen().focusControl().focusNew(); + bool is_startup = Fluxbox::instance()->isStartup(); + + // we use m_focused as a signal to focus the window when mapped + if (focus_new && !is_startup) + m_focused = true; + focused_win = (focus_new || is_startup) ? &client : m_client; client.saveBlackboxAttribs(m_blackbox_attrib); m_clientlist.push_back(&client); -- cgit v0.11.2