all repos — fluxbox @ 88f580ec0c7015462329846cf96560df79b140f7

custom fork of the fluxbox windowmanager

move fullscreen windows to normal layer when they lose focus
markt markt
commit

88f580ec0c7015462329846cf96560df79b140f7

parent

a092d3fc1b351a4c6ea1d95757b5244bf86b8a39

3 files changed, 16 insertions(+), 12 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,5 +1,8 @@

(Format: Year/Month/Day) Changes for 1.0.1: +*07/10/31: + * Move fullscreen windows to normal layer when they lose focus (Mark) + Window.cc FocusControl.cc *07/10/24: * Fixed some gcc 2.96 compile issues ( Henrik ) Layer.hh, MinOverlapPlacement.cc, Workspace.cc
M src/FocusControl.ccsrc/FocusControl.cc

@@ -156,9 +156,7 @@ s_reverting = false;

} } - if (isCycling()) - fbwin->tempRaise(); - else + if (!isCycling()) fbwin->raise(); m_cycling_window = it;
M src/Window.ccsrc/Window.cc

@@ -127,7 +127,7 @@ }

/// returns the deepest transientFor, asserting against a close loop WinClient *getRootTransientFor(WinClient *client) { - while (client->transientFor()) { + while (client && client->transientFor()) { assert(client != client->transientFor()); client = client->transientFor(); }

@@ -1317,12 +1317,6 @@ else

screen().changeWorkspaceID(workspaceNumber()); } - FluxboxWindow *cur = FocusControl::focusedFbWindow(); - WinClient *client = FocusControl::focusedWindow(); - if (cur && client && cur != this && cur->isFullscreen() && - getRootTransientFor(m_client) != getRootTransientFor(client)) - return false; - if (isIconic()) { deiconify(); m_focused = true; // signal to mapNotifyEvent to set focus when mapped

@@ -1893,7 +1887,7 @@

if (!m_initialized) m_layernum = layernum; - if (m_layernum == layernum && !force) + if (m_layernum == layernum && !force || !m_client) return; // get root window

@@ -1942,6 +1936,8 @@

// window has actually RECEIVED focus (got a FocusIn event) // so now we make it a focused frame etc void FluxboxWindow::setFocusFlag(bool focus) { + if (!m_client) return; + bool was_focused = isFocused(); m_focused = focus; #ifdef DEBUG

@@ -1950,10 +1946,17 @@ #endif // DEBUG

installColormap(focus); + if (fullscreen && !focus) + moveToLayer(m_old_layernum); + if (fullscreen && focus) + moveToLayer(::Layer::ABOVE_DOCK); + if (focus != frame().focused()) frame().setFocus(focus); - if (screen().doAutoRaise() && !screen().focusControl().isCycling()) { + if (screen().focusControl().isCycling()) + tempRaise(); + else if (screen().doAutoRaise()) { if (m_focused) m_timer.start(); else