diff --git a/app/layouts/synchronizer.cpp b/app/layouts/synchronizer.cpp index 8e1e4624c..d38ccd9a3 100644 --- a/app/layouts/synchronizer.cpp +++ b/app/layouts/synchronizer.cpp @@ -6,6 +6,7 @@ #include "synchronizer.h" //! local +#include #include "importer.h" #include "manager.h" #include "../apptypes.h" @@ -144,7 +145,7 @@ QStringList Synchronizer::freeActivities() } QStringList Synchronizer::runningActivities() -{ +{ return m_manager->corona()->activitiesConsumer()->runningActivities(); } @@ -878,11 +879,13 @@ void Synchronizer::syncMultipleLayoutsToActivities() //! discover layouts assigned to explicit activities based on running activities for (const auto &activity : runningActivities()) { +#if KF5_VERSION_MINOR < 81 if (KWindowSystem::isPlatformWayland() && (m_activitiesController->currentActivity() != activity)){ - //! Wayland Protection: Plasma wayland does not support yet Activities for windows - //! but we can load the layouts that belong OnAllActivities + (ForFreeActivities OR SpecificActivity) + //! Wayland Protection: Plasma wayland does not support Activities for windows before kde frameworks 5.81 + //! In that scenario we can load the layouts that belong OnAllActivities + (ForFreeActivities OR SpecificActivity) continue; } +#endif if (m_assignedLayouts.contains(activity)) { layoutNamesToLoad << m_assignedLayouts[activity]; diff --git a/app/view/positioner.cpp b/app/view/positioner.cpp index 5e1f89738..ad3ccbc65 100644 --- a/app/view/positioner.cpp +++ b/app/view/positioner.cpp @@ -240,6 +240,8 @@ void Positioner::updateWaylandId() m_trackedWindowId = newId; m_corona->wm()->registerIgnoredWindow(m_trackedWindowId); + + emit winIdChanged(); } } diff --git a/app/view/positioner.h b/app/view/positioner.h index 0e72d93fc..481b3afa7 100644 --- a/app/view/positioner.h +++ b/app/view/positioner.h @@ -109,6 +109,7 @@ signals: void screenGeometryChanged(); void slideOffsetChanged(); void windowSizeChanged(); + void winIdChanged(); //! these two signals are used from config ui and containment ui //! in order to orchestrate an animated hiding/showing of dock diff --git a/app/view/view.cpp b/app/view/view.cpp index 4b79c561c..00697de02 100644 --- a/app/view/view.cpp +++ b/app/view/view.cpp @@ -286,6 +286,7 @@ void View::init(Plasma::Containment *plasma_containment) connect(this, &View::maxNormalThicknessChanged, this, &View::editThicknessChanged); connect(this, &View::activitiesChanged, this, &View::applyActivitiesToWindows); + connect(m_positioner, &ViewPart::Positioner::winIdChanged, this, &View::applyActivitiesToWindows); connect(this, &View::localGeometryChanged, this, [&]() { updateAbsoluteGeometry();