catch changeMaximize recursion from setNoBorder

polluted the restore geometry for unmaximizing from quick maximization when using BorderlessMax'd

CCBUG: 279529
(cherry picked from commit 5ca44bfd7dce34504ff5fdc25818470bc672e358)
icc-effect-5.14.5
Thomas Lübking 2011-09-08 23:05:50 +02:00
parent c071056913
commit dd05eebbe2
1 changed files with 8 additions and 2 deletions

View File

@ -2101,9 +2101,10 @@ void Client::setMaximize(bool vertically, bool horizontally)
clientGroup()->updateStates(this);
}
static bool changeMaximizeRecursion = false;
void Client::changeMaximize(bool vertical, bool horizontal, bool adjust)
{
if (!isMaximizable())
if (!isMaximizable() || changeMaximizeRecursion)
return;
MaximizeMode old_mode = max_mode;
@ -2134,8 +2135,13 @@ void Client::changeMaximize(bool vertical, bool horizontal, bool adjust)
else
clientArea = workspace()->clientArea(MaximizeArea, this);
if (options->borderlessMaximizedWindows())
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)) {