From 920cb81caf2b3b86ad91f9a7290f7383af7ec0d7 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Wed, 27 Aug 2008 18:57:35 -0400 Subject: don't change a fullscreen window's layer when its transient takes the focus --- src/Window.cc | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index 7c3e36c..1053ee3 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -475,21 +475,16 @@ void FluxboxWindow::init() { if (m_workspace_number >= screen().numberOfWorkspaces()) m_workspace_number = screen().currentWorkspaceID(); - // if we're a transient then we should be on the same layer as our parent + // if we're a transient then we should be on the same layer and workspace if (m_client->isTransient() && m_client->transientFor()->fbwindow() && - m_client->transientFor()->fbwindow() != this) + m_client->transientFor()->fbwindow() != this) { layerItem().setLayer(m_client->transientFor()->fbwindow()->layerItem().getLayer()); - else // if no parent then set default layer - moveToLayer(m_state.layernum, m_state.layernum != ::Layer::NORMAL); - - // transients should be on the same workspace as parent - if (m_client->isTransient() && - m_client->transientFor()->fbwindow()) { + m_state.layernum = m_client->transientFor()->fbwindow()->layerNum(); m_workspace_number = m_client->transientFor()->fbwindow()->workspaceNumber(); - } - + } else // if no parent then set default layer + moveToLayer(m_state.layernum, m_state.layernum != ::Layer::NORMAL); #ifdef DEBUG cerr<<"FluxboxWindow::init("<screen() != &screen() || - getOnHead() != foc->getOnHead()) { + getOnHead() != foc->getOnHead() || + (foc->winClient().isTransient() && + foc->winClient().transientFor()->fbwindow() == this)) { moveToLayer(::Layer::ABOVE_DOCK); } else { moveToLayer(::Layer::DESKTOP); -- cgit v0.11.2