fix shadow quad update, allows to change shadow size with property update

(been OpenGL issue only)
fix TopLevel::visibleRect, broke shaded windows with empty (too big) shadows

REVIEW: 103231
(cherry picked from commit 535d40e7b4ca5a4431446c3d5c70e6d52f541fae)
This commit is contained in:
Thomas Lübking 2011-11-25 01:00:54 +01:00
parent 796c9d43ae
commit f3d1261680
2 changed files with 3 additions and 1 deletions

View file

@ -199,6 +199,8 @@ bool Shadow::updateShadow()
return false; return false;
} }
init(data); init(data);
if (m_topLevel && m_topLevel->effectWindow())
m_topLevel->effectWindow()->buildQuads(true);
return true; return true;
} }

View file

@ -146,7 +146,7 @@ void Toplevel::disownDataPassedToDeleted()
QRect Toplevel::visibleRect() const QRect Toplevel::visibleRect() const
{ {
if (hasShadow()) { if (hasShadow() && !shadow()->shadowRegion().isEmpty()) {
return shadow()->shadowRegion().boundingRect().translated(geometry().topLeft()); return shadow()->shadowRegion().boundingRect().translated(geometry().topLeft());
} }
return geometry(); return geometry();