From f3d12616808b76cbb0f0e44e2e91e6d30a3307ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Fri, 25 Nov 2011 01:00:54 +0100 Subject: [PATCH] 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) --- shadow.cpp | 2 ++ toplevel.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/shadow.cpp b/shadow.cpp index e60144b356..ed610da93c 100644 --- a/shadow.cpp +++ b/shadow.cpp @@ -199,6 +199,8 @@ bool Shadow::updateShadow() return false; } init(data); + if (m_topLevel && m_topLevel->effectWindow()) + m_topLevel->effectWindow()->buildQuads(true); return true; } diff --git a/toplevel.cpp b/toplevel.cpp index 89e29086fd..6b62fe87f9 100644 --- a/toplevel.cpp +++ b/toplevel.cpp @@ -146,7 +146,7 @@ void Toplevel::disownDataPassedToDeleted() QRect Toplevel::visibleRect() const { - if (hasShadow()) { + if (hasShadow() && !shadow()->shadowRegion().isEmpty()) { return shadow()->shadowRegion().boundingRect().translated(geometry().topLeft()); } return geometry();