aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Window.cc19
1 files 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() {
475 if (m_workspace_number >= screen().numberOfWorkspaces()) 475 if (m_workspace_number >= screen().numberOfWorkspaces())
476 m_workspace_number = screen().currentWorkspaceID(); 476 m_workspace_number = screen().currentWorkspaceID();
477 477
478 // if we're a transient then we should be on the same layer as our parent 478 // if we're a transient then we should be on the same layer and workspace
479 if (m_client->isTransient() && 479 if (m_client->isTransient() &&
480 m_client->transientFor()->fbwindow() && 480 m_client->transientFor()->fbwindow() &&
481 m_client->transientFor()->fbwindow() != this) 481 m_client->transientFor()->fbwindow() != this) {
482 layerItem().setLayer(m_client->transientFor()->fbwindow()->layerItem().getLayer()); 482 layerItem().setLayer(m_client->transientFor()->fbwindow()->layerItem().getLayer());
483 else // if no parent then set default layer 483 m_state.layernum = m_client->transientFor()->fbwindow()->layerNum();
484 moveToLayer(m_state.layernum, m_state.layernum != ::Layer::NORMAL);
485
486 // transients should be on the same workspace as parent
487 if (m_client->isTransient() &&
488 m_client->transientFor()->fbwindow()) {
489 m_workspace_number = 484 m_workspace_number =
490 m_client->transientFor()->fbwindow()->workspaceNumber(); 485 m_client->transientFor()->fbwindow()->workspaceNumber();
491 } 486 } else // if no parent then set default layer
492 487 moveToLayer(m_state.layernum, m_state.layernum != ::Layer::NORMAL);
493 488
494#ifdef DEBUG 489#ifdef DEBUG
495 cerr<<"FluxboxWindow::init("<<title()<<") transientFor: "<< 490 cerr<<"FluxboxWindow::init("<<title()<<") transientFor: "<<
@@ -1472,7 +1467,9 @@ void FluxboxWindow::setFullscreenLayer() {
1472 FluxboxWindow *foc = FocusControl::focusedFbWindow(); 1467 FluxboxWindow *foc = FocusControl::focusedFbWindow();
1473 // if another window on the same head is focused, make sure we can see it 1468 // if another window on the same head is focused, make sure we can see it
1474 if (isFocused() || !foc || &foc->screen() != &screen() || 1469 if (isFocused() || !foc || &foc->screen() != &screen() ||
1475 getOnHead() != foc->getOnHead()) { 1470 getOnHead() != foc->getOnHead() ||
1471 (foc->winClient().isTransient() &&
1472 foc->winClient().transientFor()->fbwindow() == this)) {
1476 moveToLayer(::Layer::ABOVE_DOCK); 1473 moveToLayer(::Layer::ABOVE_DOCK);
1477 } else { 1474 } else {
1478 moveToLayer(::Layer::DESKTOP); 1475 moveToLayer(::Layer::DESKTOP);