diff --git a/shell/panelview.cpp b/shell/panelview.cpp --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -951,19 +951,33 @@ void PanelView::updateMask() { - if (KWindowSystem::compositingActive()) { - setMask(QRegion()); - } else { + QRegion mask; + + QQuickItem *rootObject = this->rootObject(); + if (rootObject) { + const QVariant maskProperty = rootObject->property("panelMask"); + if (static_cast(maskProperty.type()) == QMetaType::QRegion) { + mask = maskProperty.value(); + } + } + + // old hack for non-compositing: + // assuming the desktoptheme uses "widgets/panel-background" for the panel + // before "panelMask" was added to expected property set of panel objects + // TODO: understand if still needed + if (mask.isEmpty() && !KWindowSystem::compositingActive()) { if (!m_background) { m_background = new Plasma::FrameSvg(this); m_background->setImagePath(QStringLiteral("widgets/panel-background")); } m_background->setEnabledBorders(enabledBorders()); m_background->resizeFrame(size()); - setMask(m_background->mask()); + mask = m_background->mask(); } + + setMask(mask); } bool PanelView::canSetStrut() const