if a window is prevented from stealing the focus, don't put it on top
This commit is contained in:
parent
84e5586ca1
commit
0676161673
1 changed files with 11 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue