fix #292,workaround for KF5.32 empty mask

--in KF5.32 FrameSvg returns many times a mask
that is an empty QRegion(). this patch makes
sure that at least our rectangular metrics
for masks and effectsarea are used instead.
Of course this means that themes with rounded
corners dont look as they should in !compositing
state
v0.6
Michail Vourlakos 8 years ago
parent 943c2a45a8
commit 62a1346509

@ -899,7 +899,13 @@ void DockView::setMaskArea(QRect area)
m_background->setEnabledBorders(enabledBorders());
m_background->resizeFrame(area.size());
QRegion fixedMask = m_background->mask();
fixedMask.translate(area.x(), area.y());
fixedMask.translate(m_maskArea.x(), m_maskArea.y());
//! fix for KF5.32 that return empty QRegion's for the mask
if (fixedMask.isEmpty()) {
fixedMask = QRegion(m_maskArea);
}
setMask(fixedMask);
}
@ -977,6 +983,11 @@ void DockView::updateEffects()
QRegion fixedMask = m_background->mask();
fixedMask.translate(m_effectsArea.x(), m_effectsArea.y());
//! fix for KF5.32 that return empty QRegion's for the mask
if (fixedMask.isEmpty()) {
fixedMask = QRegion(m_effectsArea);
}
KWindowEffects::enableBlurBehind(winId(), true, fixedMask);
KWindowEffects::enableBackgroundContrast(winId(), m_theme.backgroundContrastEnabled(),
m_theme.backgroundContrast(),

Loading…
Cancel
Save