From d910217bb97402b9fd3bf29ff5753fc3579cd38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 12 Sep 2016 11:13:11 +0200 Subject: [PATCH] [effects] Repaint expandedGeometry in HighlightWindowsEffect Summary: The highlight windows effect tried to trigger repaints with the shadow included by having an hardcoded pixel offset. This of course breaks if the shadow is larger than the hardcoded value. The reason presented on why it was done like that is no longer true and in the effects the actual visible area including decorations and shadows is available through the expandedGeometry. BUG: 368495 Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D2748 --- effects/highlightwindow/highlightwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/effects/highlightwindow/highlightwindow.cpp b/effects/highlightwindow/highlightwindow.cpp index 2e9a836c3a..7e48330b21 100644 --- a/effects/highlightwindow/highlightwindow.cpp +++ b/effects/highlightwindow/highlightwindow.cpp @@ -62,7 +62,7 @@ void HighlightWindowEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& if (*opacity < 0.98f) data.setTranslucent(); if (oldOpacity != *opacity) - effects->addRepaint(w->geometry().adjusted(-16,-16,16,32)); // add some padding. w->addRepaintFull() is wrong for at least isInitiallyHidden ... + effects->addRepaint(w->expandedGeometry()); } else if (m_finishing && m_windowOpacity.contains(w)) { // Final fading back in animation if (opacity == m_windowOpacity.end()) @@ -76,7 +76,7 @@ void HighlightWindowEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& if (*opacity < 0.98f) data.setTranslucent(); if (oldOpacity != *opacity) - effects->addRepaint(w->geometry().adjusted(-16,-16,16,32)); // ... see above ... because the window is pot. gone in the last pass + effects->addRepaint(w->expandedGeometry()); if (*opacity > 0.98f || *opacity < 0.02f) { m_windowOpacity.remove(w); // We default to 1.0