~ubuntu-branches/ubuntu/precise/kde-workspace/precise-security

« back to all changes in this revision

Viewing changes to kwin/geometry.cpp

Tags: upstream-4.7.2
Import upstream version 4.7.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
2153
2153
        clientGroup()->updateStates(this);
2154
2154
}
2155
2155
 
 
2156
static bool changeMaximizeRecursion = false;
2156
2157
void Client::changeMaximize(bool vertical, bool horizontal, bool adjust)
2157
2158
{
2158
 
    if (!isMaximizable())
 
2159
    if (!isMaximizable() || changeMaximizeRecursion)
2159
2160
        return;
2160
2161
 
2161
2162
    MaximizeMode old_mode = max_mode;
2186
2187
    else
2187
2188
        clientArea = workspace()->clientArea(MaximizeArea, this);
2188
2189
 
2189
 
    if (options->borderlessMaximizedWindows())
 
2190
    if (options->borderlessMaximizedWindows()) {
 
2191
        // triggers a maximize change.
 
2192
        // The next setNoBorder interation will exit since there's no change but the first recursion pullutes the restore/pretile geometry
 
2193
        changeMaximizeRecursion = true;
2190
2194
        setNoBorder(app_noborder || max_mode == MaximizeFull);
 
2195
        changeMaximizeRecursion = false;
 
2196
    }
2191
2197
 
2192
2198
    // save sizes for restoring, if maximalizing
2193
2199
    if (!adjust && !(old_mode & MaximizeVertical)) {