Blur breaks with plasma 5.25
I run this with kvantum and while windows are properly blurred their decoration isn't
example:

Same here. @Zren is there a fix?
@Zren fixed it https://github.com/nicman23/material-decoration/commit/16ac01a107dff0113d74d3a3ae9436a6c97acb59
@nicman23 It works fine on my Plasma system with your fork. Thanks!
I found this issue after trying to get blurred decorations not knowing it was a bug, it may not be immediately noticeable because some windows can set explicitly its blur and it forces the decoration to be blurred too, as it happens with konsole or when using the "force blur" kwin script, but even then is glitchy.
I couldn't build @nicman23 fork but I made a patch out of his changes for last commit 4784647e622c37a078cb119626916ac53155bdb9
--- a/src/Decoration.cc 2023-01-12 23:37:53.407256227 -0600
+++ b/src/Decoration.cc 2023-01-12 23:37:16.340695505 -0600
@@ -200,6 +200,7 @@ void Decoration::paint(QPainter *painter, const QRect &repaintRegion)
if (settings()->borderSize() >= KDecoration2::BorderSize::Normal) {
paintOutline(painter, repaintRegion);
}
+ setBlurRegion( QRegion(this->titleBar()) );
}
void Decoration::init()
@@ -319,7 +320,7 @@ void Decoration::hoverEnterEvent(QHoverEvent *event)
{
KDecoration2::Decoration::hoverEnterEvent(event);
qCDebug(category) << "Decoration::hoverEnterEvent" << event;
-
+ setBlurRegion( QRegion(this->titleBar()) );
// m_menuButtons->setHovered(true);
}
@@ -345,6 +346,7 @@ void Decoration::hoverMoveEvent(QHoverEvent *event)
// } else if (wasHovered && contains) {
// // HoverMove
// }
+ setBlurRegion( QRegion(this->titleBar()) );
}
void Decoration::mouseReleaseEvent(QMouseEvent *event)
@@ -353,6 +355,7 @@ Decoration::mouseReleaseEvent(QMouseEvent *event)
// qCDebug(category) << "Decoration::mouseReleaseEvent" << event;
resetDragMove();
+ setBlurRegion( QRegion(this->titleBar()) );
}
void Decoration::hoverLeaveEvent(QHoverEvent *event)
@@ -361,7 +364,7 @@ void Decoration::hoverLeaveEvent(QHoverEvent *event)
qCDebug(category) << "Decoration::hoverLeaveEvent" << event;
resetDragMove();
-
+ setBlurRegion( QRegion(this->titleBar()) );
// m_menuButtons->setHovered(false);
}
@Zren This indeed fixed the blur.
- https://invent.kde.org/plasma/kdecoration/-/merge_requests/17 (
Decoration::setBlurRegion) - Aurorae implementation:
https://invent.kde.org/plasma/kwin/-/merge_requests/196 - Breeze has no implementation
- SierraBreezeEnhanced:
https://github.com/kupiqu/SierraBreezeEnhanced/blob/master/breezedecoration.cpp#L754-L763 - Klassy:
https://github.com/paulmcauley/klassy/blob/master/kdecoration/breezedecoration.cpp#L1623-L1635
Hmm, I need to check if the frame left/bottom/right is transparent blurred and make sure that works too. I always use no borders though so I can see it not being tested.
SierraBreezeEnhaced and Klassy uses:
setBlurRegion( QRegion( m_windowPath->toFillPolygon().toPolygon()) ) ;
I moved the setBlurRegion() calls to it's own function. I also changed the region to:
void Decoration::updateBlur()
{
#if HAVE_KDecoration2_5_25
setBlurRegion(QRegion(0, 0, size().width(), size().height()));
#endif
}
Which seem to blur fine. Not sure why the outline is offset though. Need to test on a non busted GPU.

@Zren you were right, I had no borders set and didn't noticed the Left/Right/Bottom borders

Using setBlurRegion(QRegion(0, 0, size().width(), size().height()));

Applies blur to all sides.
I've got that weird outline too before and after, this is on an old Intel HD 5500 GPU.