From 0aefd56e0fe892ad18e61ff7af8b24d92f1439d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Wed, 7 Mar 2012 14:46:17 +0100 Subject: [PATCH] store restore size /before/ removing the decoration for BorderlessMaximized (lead to window resizes on unmaximization) BUG: 295449 REVIEW: 104185 --- geometry.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index d9ae97ada3..8af615ff1a 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -2133,6 +2133,8 @@ void Client::changeMaximize(bool vertical, bool horizontal, bool adjust) { if (changeMaximizeRecursion) return; + + // sic! codeblock for TemporaryAssign { // isMovable() and isResizable() may be false for maximized windows // with moving/resizing maximized windows disabled @@ -2169,14 +2171,6 @@ void Client::changeMaximize(bool vertical, bool horizontal, bool adjust) else clientArea = workspace()->clientArea(MaximizeArea, this); - if (options->borderlessMaximizedWindows()) { - // triggers a maximize change. - // The next setNoBorder interation will exit since there's no change but the first recursion pullutes the restore/pretile geometry - changeMaximizeRecursion = true; - setNoBorder(app_noborder || max_mode == MaximizeFull); - changeMaximizeRecursion = false; - } - // save sizes for restoring, if maximalizing if (!adjust && !(old_mode & MaximizeVertical)) { geom_restore.setTop(y()); @@ -2194,6 +2188,14 @@ void Client::changeMaximize(bool vertical, bool horizontal, bool adjust) geom_pretile.setWidth(width()); } + if (options->borderlessMaximizedWindows()) { + // triggers a maximize change. + // The next setNoBorder interation will exit since there's no change but the first recursion pullutes the restore/pretile geometry + changeMaximizeRecursion = true; + setNoBorder(app_noborder || max_mode == MaximizeFull); + changeMaximizeRecursion = false; + } + if (!adjust) { if ((vertical && !(old_mode & MaximizeVertical)) || (horizontal && !(old_mode & MaximizeHorizontal)))