When restarting kwin and there is a shaded group, set shade is called before a decoration is created. Catch this case, so that kwin doesn't crash.

This fix is related to rev 1140342.
CCBUG: 242206

svn path=/trunk/KDE/kdebase/workspace/; revision=1140343
This commit is contained in:
Martin Gräßlin 2010-06-20 12:21:44 +00:00
parent c9658fa34a
commit 73a3e3ca2d

View file

@ -981,6 +981,7 @@ void Client::setShade( ShadeMode mode )
assert( decoration != NULL ); // noborder windows can't be shaded
GeometryUpdatesBlocker blocker( this );
// Decorations may turn off some borders when shaded
if( decoration )
decoration->borders( border_left, border_right, border_top, border_bottom );
// TODO: All this unmapping, resizing etc. feels too much duplicated from elsewhere
@ -1025,6 +1026,7 @@ void Client::setShade( ShadeMode mode )
updateVisibility();
updateAllowedActions();
workspace()->updateMinimizedOfTransients( this );
if( decoration )
decoration->shadeChange();
updateWindowRules();