Recursion check while decoration updates the borders

Mostly a safety check, but fixes a crash with borderless maximized
windows. If that option is set we also do not notify the decoration
at all, as the deco will be destroyed anyway.

BUG: 341675
REVIEW: 121858
This commit is contained in:
Martin Gräßlin 2015-01-05 14:04:43 +01:00
parent 3f6524da8b
commit 38849215d5

View file

@ -2203,7 +2203,8 @@ void Client::changeMaximize(bool vertical, bool horizontal, bool adjust)
}
// call into decoration update borders
if (m_decoration && m_decoration->client()) {
if (m_decoration && m_decoration->client() && !(options->borderlessMaximizedWindows() && max_mode == KWin::MaximizeFull)) {
changeMaximizeRecursion = true;
const auto c = m_decoration->client().data();
if ((max_mode & MaximizeVertical) != (old_mode & MaximizeVertical)) {
emit c->maximizedVerticallyChanged(max_mode & MaximizeVertical);
@ -2214,6 +2215,7 @@ void Client::changeMaximize(bool vertical, bool horizontal, bool adjust)
if ((max_mode == MaximizeFull) != (old_mode == MaximizeFull)) {
emit c->maximizedChanged(max_mode & MaximizeFull);
}
changeMaximizeRecursion = false;
}
// save sizes for restoring, if maximalizing