singlelayout:fix borderless activation/deactivation

work/m_layershell
Michail Vourlakos 3 years ago
parent 4725cd7f2b
commit 4a9bf2cb7a

@ -57,7 +57,14 @@ Synchronizer::Synchronizer(QObject *parent)
this, &Synchronizer::onActivityRemoved); this, &Synchronizer::onActivityRemoved);
connect(m_manager->corona()->activitiesConsumer(), &KActivities::Consumer::currentActivityChanged, connect(m_manager->corona()->activitiesConsumer(), &KActivities::Consumer::currentActivityChanged,
this, &Synchronizer::updateBorderlessMaximizedAfterTimer); this, [&]() {
if (m_manager->memoryUsage() == MemoryUsage::MultipleLayouts) {
//! this signal is also triggered when runningactivities are changed and actually is received first
//! this is why we need a timer here in order to delay that execution and not activate/deactivate
//! maximizedborders faulty because syncMultipleLayoutsToActivities(); has not been executed yet
updateBorderlessMaximizedAfterTimer();
}
});
connect(m_manager->corona()->activitiesConsumer(), &KActivities::Consumer::runningActivitiesChanged, connect(m_manager->corona()->activitiesConsumer(), &KActivities::Consumer::runningActivitiesChanged,
this, [&]() { this, [&]() {
@ -470,13 +477,11 @@ void Synchronizer::onActivityRemoved(const QString &activityid)
void Synchronizer::updateBorderlessMaximizedAfterTimer() void Synchronizer::updateBorderlessMaximizedAfterTimer()
{ {
if (m_manager->memoryUsage() == MemoryUsage::MultipleLayouts) {
//! this signal is also triggered when runningactivities are changed and actually is received first //! this signal is also triggered when runningactivities are changed and actually is received first
//! this is why we need a timer here in order to delay that execution and not activate/deactivate //! this is why we need a timer here in order to delay that execution and not activate/deactivate
//! maximizedborders faulty because syncMultipleLayoutsToActivities(); has not been executed yet //! maximizedborders faulty because syncMultipleLayoutsToActivities(); has not been executed yet
m_updateBorderlessMaximized.start(); m_updateBorderlessMaximized.start();
} }
}
void Synchronizer::hideAllViews() void Synchronizer::hideAllViews()
{ {

Loading…
Cancel
Save