if a window is prevented from stealing the focus, don't put it on top
Mark Tiefenbruck mark@fluxbox.org
1 files changed,
11 insertions(+),
4 deletions(-)
jump to
M
src/Window.cc
→
src/Window.cc
@@ -549,8 +549,11 @@ deiconify(false);
// check if we should prevent this window from gaining focus m_focused = false; // deiconify sets this if (!Fluxbox::instance()->isStartup() && - screen().focusControl().focusNew()) + screen().focusControl().focusNew()) { m_focused = focusRequestFromClient(*m_client); + if (!m_focused) + lower(); + } } if (fullscreen) {@@ -2224,11 +2227,15 @@
// Note: this function never gets called from WithdrawnState // initial state is handled in restoreAttributes() and init() - if (screen().focusControl().focusNew()) - m_focused = focusRequestFromClient(*client); - setCurrentClient(*client, false); // focus handled on MapNotify deiconify(); + + if (screen().focusControl().focusNew()) { + m_focused = false; // deiconify sets this + m_focused = focusRequestFromClient(*client); + if (!m_focused) + lower(); + } }