[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
This commit is contained in:
parent
4235871667
commit
d910217bb9
1 changed files with 2 additions and 2 deletions
|
@ -62,7 +62,7 @@ void HighlightWindowEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData&
|
||||||
if (*opacity < 0.98f)
|
if (*opacity < 0.98f)
|
||||||
data.setTranslucent();
|
data.setTranslucent();
|
||||||
if (oldOpacity != *opacity)
|
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)) {
|
} else if (m_finishing && m_windowOpacity.contains(w)) {
|
||||||
// Final fading back in animation
|
// Final fading back in animation
|
||||||
if (opacity == m_windowOpacity.end())
|
if (opacity == m_windowOpacity.end())
|
||||||
|
@ -76,7 +76,7 @@ void HighlightWindowEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData&
|
||||||
if (*opacity < 0.98f)
|
if (*opacity < 0.98f)
|
||||||
data.setTranslucent();
|
data.setTranslucent();
|
||||||
if (oldOpacity != *opacity)
|
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) {
|
if (*opacity > 0.98f || *opacity < 0.02f) {
|
||||||
m_windowOpacity.remove(w); // We default to 1.0
|
m_windowOpacity.remove(w); // We default to 1.0
|
||||||
|
|
Loading…
Reference in a new issue