diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-27 22:57:35 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2008-08-27 22:57:35 (GMT) |
commit | 920cb81caf2b3b86ad91f9a7290f7383af7ec0d7 (patch) | |
tree | 9e124b5b7a906971ec46d59c6e70a720501ce47a /src | |
parent | 82047e6a391a12be9583168f28ac72c1154108d6 (diff) | |
download | fluxbox-920cb81caf2b3b86ad91f9a7290f7383af7ec0d7.zip fluxbox-920cb81caf2b3b86ad91f9a7290f7383af7ec0d7.tar.bz2 |
don't change a fullscreen window's layer when its transient takes the focus
Diffstat (limited to 'src')
-rw-r--r-- | src/Window.cc | 19 |
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); |