Really fix the crash on gwenview startup this time.

Apparently a Toplevel isn't always a Client when the client rect 
is different from the toplevel rect.

svn path=/trunk/KDE/kdebase/workspace/; revision=980458
icc-effect-5.14.5
Fredrik Höglund 2009-06-11 19:42:55 +00:00
parent b466509093
commit 33b8ab7d91
1 changed files with 2 additions and 2 deletions

View File

@ -480,9 +480,9 @@ WindowQuadList Scene::Window::buildQuads( bool force ) const
ret = makeQuads( WindowQuadContents, shape()); // has no decoration
else
{
Client *client = static_cast<Client*>( toplevel );
Client *client = dynamic_cast<Client*>( toplevel );
QRegion contents = clientShape();
QRegion decoration = (Workspace::self()->decorationHasAlpha() ?
QRegion decoration = (client && Workspace::self()->decorationHasAlpha() ?
QRegion(client->decorationRect()) : shape()) - contents;
ret = makeQuads( WindowQuadContents, contents );
ret += makeQuads( WindowQuadDecoration, decoration );