if a window is prevented from stealing the focus, don't put it on top

This commit is contained in:
Mark Tiefenbruck 2007-12-21 22:44:14 -08:00
parent 84e5586ca1
commit 0676161673

View file

@ -549,8 +549,11 @@ void FluxboxWindow::init() {
// 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,12 +2227,16 @@ void FluxboxWindow::mapRequestEvent(XMapRequestEvent &re) {
// 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();
}
}
bool FluxboxWindow::focusRequestFromClient(WinClient &from) {