diff --git a/app/lattecorona.cpp b/app/lattecorona.cpp index 380abb7f6..da53014d7 100644 --- a/app/lattecorona.cpp +++ b/app/lattecorona.cpp @@ -96,7 +96,8 @@ Corona::Corona(bool defaultLayoutOnStartup, QString layoutNameOnStartUp, int use m_globalShortcuts(new GlobalShortcuts(this)), m_plasmaScreenPool(new PlasmaExtended::ScreenPool(this)), m_themeExtended(new PlasmaExtended::Theme(KSharedConfig::openConfig(), this)), - m_layoutsManager(new Layouts::Manager(this)) + m_layoutsManager(new Layouts::Manager(this)), + m_dialogShadows(new PanelShadows(this, QStringLiteral("dialogs/background"))) { //! create the window manager @@ -184,6 +185,7 @@ Corona::~Corona() m_layoutsManager->unload(); m_wm->deleteLater(); + m_dialogShadows->deleteLater(); m_globalShortcuts->deleteLater(); m_layoutsManager->deleteLater(); m_screenPool->deleteLater(); @@ -403,6 +405,11 @@ KActivities::Consumer *Corona::activitiesConsumer() const return m_activityConsumer; } +PanelShadows *Corona::dialogShadows() const +{ + return m_dialogShadows; +} + GlobalShortcuts *Corona::globalShortcuts() const { return m_globalShortcuts; diff --git a/app/lattecorona.h b/app/lattecorona.h index c9317b99c..44f036552 100644 --- a/app/lattecorona.h +++ b/app/lattecorona.h @@ -24,6 +24,7 @@ // local #include "plasma/quick/configview.h" #include "layout/storage.h" +#include "view/panelshadows_p.h" #include "../liblatte2/types.h" // Qt @@ -137,6 +138,8 @@ public: WindowSystem::AbstractWindowInterface *wm() const; + PanelShadows *dialogShadows() const; + //! these functions are used from context menu through containmentactions void switchToLayout(QString layout); void showSettingsWindow(int page); @@ -219,6 +222,8 @@ private: WindowSystem::AbstractWindowInterface *m_wm{nullptr}; + PanelShadows *m_dialogShadows{nullptr}; + KWayland::Client::PlasmaShell *m_waylandCorona{nullptr}; friend class GlobalShortcuts; diff --git a/app/view/settings/primaryconfigview.cpp b/app/view/settings/primaryconfigview.cpp index 822020b26..c836ff5f4 100644 --- a/app/view/settings/primaryconfigview.cpp +++ b/app/view/settings/primaryconfigview.cpp @@ -130,6 +130,8 @@ PrimaryConfigView::~PrimaryConfigView() { qDebug() << "ConfigView deleting ..."; + m_corona->dialogShadows()->removeWindow(this); + m_corona->wm()->unregisterIgnoredWindow(KWindowSystem::isPlatformX11() ? winId() : m_waylandWindowId); deleteSecondaryWindow(); @@ -149,7 +151,7 @@ void PrimaryConfigView::init() setDefaultAlphaBuffer(true); setColor(Qt::transparent); - PanelShadows::self()->addWindow(this); + m_corona->dialogShadows()->addWindow(this); rootContext()->setContextProperty(QStringLiteral("latteView"), m_latteView); rootContext()->setContextProperty(QStringLiteral("shortcutsEngine"), m_corona->globalShortcuts()->shortcutsTracker()); rootContext()->setContextProperty(QStringLiteral("viewConfig"), this); @@ -692,7 +694,7 @@ void PrimaryConfigView::updateEnabledBorders() if (m_enabledBorders != borders) { m_enabledBorders = borders; - PanelShadows::self()->addWindow(this, m_enabledBorders); + m_corona->dialogShadows()->addWindow(this, m_enabledBorders); emit enabledBordersChanged(); } diff --git a/app/view/settings/secondaryconfigview.cpp b/app/view/settings/secondaryconfigview.cpp index a74c23cf8..f79876670 100644 --- a/app/view/settings/secondaryconfigview.cpp +++ b/app/view/settings/secondaryconfigview.cpp @@ -112,6 +112,8 @@ SecondaryConfigView::~SecondaryConfigView() { qDebug() << "SecDockConfigView deleting ..."; + m_corona->dialogShadows()->removeWindow(this); + m_corona->wm()->unregisterIgnoredWindow(KWindowSystem::isPlatformX11() ? winId() : m_waylandWindowId); for (const auto &var : connections) { @@ -125,7 +127,7 @@ void SecondaryConfigView::init() setDefaultAlphaBuffer(true); setColor(Qt::transparent); - PanelShadows::self()->addWindow(this); + m_corona->dialogShadows()->addWindow(this); rootContext()->setContextProperty(QStringLiteral("latteView"), m_latteView); rootContext()->setContextProperty(QStringLiteral("viewConfig"), this); rootContext()->setContextProperty(QStringLiteral("plasmoid"), m_latteView->containment()->property("_plasma_graphicObject").value()); @@ -438,7 +440,7 @@ void SecondaryConfigView::updateEnabledBorders() if (m_enabledBorders != borders) { m_enabledBorders = borders; - PanelShadows::self()->addWindow(this, m_enabledBorders); + m_corona->dialogShadows()->addWindow(this, m_enabledBorders); emit enabledBordersChanged(); } diff --git a/shell/package/contents/configuration/LatteDockConfiguration.qml b/shell/package/contents/configuration/LatteDockConfiguration.qml index 1a1e6f4be..4cc7aee6c 100644 --- a/shell/package/contents/configuration/LatteDockConfiguration.qml +++ b/shell/package/contents/configuration/LatteDockConfiguration.qml @@ -125,7 +125,7 @@ FocusScope { PlasmaCore.FrameSvgItem{ anchors.fill: parent - imagePath: "widgets/panel-background" + imagePath: "dialogs/background" enabledBorders: viewConfig.enabledBorders } diff --git a/shell/package/contents/configuration/LatteDockSecondaryConfiguration.qml b/shell/package/contents/configuration/LatteDockSecondaryConfiguration.qml index 30c7282d7..f8b0c2eac 100644 --- a/shell/package/contents/configuration/LatteDockSecondaryConfiguration.qml +++ b/shell/package/contents/configuration/LatteDockSecondaryConfiguration.qml @@ -51,7 +51,7 @@ FocusScope { PlasmaCore.FrameSvgItem{ anchors.fill: parent - imagePath: "widgets/panel-background" + imagePath: "dialogs/background" enabledBorders: viewConfig.enabledBorders }