all repos — fluxbox @ 0676161673d4347197c9d20fe3d613527633e597

custom fork of the fluxbox windowmanager

if a window is prevented from stealing the focus, don't put it on top
Mark Tiefenbruck mark@fluxbox.org
commit

0676161673d4347197c9d20fe3d613527633e597

parent

84e5586ca1f517c97731f6d7655d7f812ad64a65

1 files changed, 11 insertions(+), 4 deletions(-)

jump to
M src/Window.ccsrc/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(); + } }