fix tracking of MWM hints in case of removal
Thomas Lübking thomas.luebking@gmail.com
1 files changed,
8 insertions(+),
4 deletions(-)
jump to
M
src/Window.cc
→
src/Window.cc
@@ -1104,9 +1104,7 @@
void FluxboxWindow::updateMWMHintsFromClient(WinClient &client) { const WinClient::MwmHints *hint = client.getMwmHint(); - if (!hint) return; - - if (!m_toggled_decos && hint->flags & MwmHintsDecorations) { + if (hint && !m_toggled_decos && hint->flags & MwmHintsDecorations) { if (hint->decorations & MwmDecorAll) { decorations.titlebar = decorations.handle = decorations.border = decorations.iconify = decorations.maximize =@@ -1131,6 +1129,9 @@ decorations.iconify = true;
if (hint->decorations & MwmDecorMaximize) decorations.maximize = true; } + } else { + decorations.titlebar = decorations.handle = decorations.border = + decorations.iconify = decorations.maximize = decorations.menu = true; } unsigned int mask = decorationMask();@@ -1139,7 +1140,7 @@ setDecorationMask(mask, false);
// functions.tabable is ours, not special one // note that it means this window is "tabbable" - if (hint->flags & MwmHintsFunctions) { + if (hint && hint->flags & MwmHintsFunctions) { if (hint->functions & MwmFuncAll) { functions.resize = functions.move = functions.iconify = functions.maximize = functions.close = true;@@ -1158,6 +1159,9 @@ functions.maximize = true;
if (hint->functions & MwmFuncClose) functions.close = true; } + } else { + functions.resize = functions.move = functions.iconify = + functions.maximize = functions.close = true; } }