From bfe4737427d10ca098d1baff540ff8c4d44b8781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Fri, 24 Jun 2016 01:39:18 +0200 Subject: fix tracking of MWM hints in case of removal --- src/Window.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Window.cc b/src/Window.cc index f800e85..ac76aee 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1104,9 +1104,7 @@ void FluxboxWindow::reconfigure() { 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 @@ void FluxboxWindow::updateMWMHintsFromClient(WinClient &client) { 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 @@ void FluxboxWindow::updateMWMHintsFromClient(WinClient &client) { // 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 @@ void FluxboxWindow::updateMWMHintsFromClient(WinClient &client) { if (hint->functions & MwmFuncClose) functions.close = true; } + } else { + functions.resize = functions.move = functions.iconify = + functions.maximize = functions.close = true; } } -- cgit v0.11.2