From 3df681da2d274fa215ca98faa9507bcb5949ef52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sun, 31 Jul 2016 17:26:47 +0200 Subject: apply size hints when applying the state There's a setting about maximization which allows to control whether the resize increments should be honored when maximizing windows. This is currently used to control whether maximized windows may resize themselves via (rare) configure events, but not when maximizing windows - what's somehow not what the config item sells. BUG: 914 --- src/FbWinFrame.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 21f174b..3965068 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc @@ -494,14 +494,16 @@ void FbWinFrame::applyState() { } } - if (m_state.shaded) + if (m_state.shaded) { new_h = m_titlebar.height(); - - if (m_state.fullscreen) { + } else if (m_state.fullscreen) { new_x = m_screen.getHeadX(head); new_y = m_screen.getHeadY(head); new_w = m_screen.getHeadWidth(head); new_h = m_screen.getHeadHeight(head); + } else { + applySizeHints(new_w, new_h, m_state.maximized == WindowState::MAX_NONE || + !m_screen.getMaxIgnoreIncrement()); } moveResize(new_x, new_y, new_w, new_h, true, true, true); -- cgit v0.11.2