From cf1cb1ca8ef23e6c9939e08f24e1f0da3d6f99f7 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sat, 18 Jul 2020 19:40:31 +0300 Subject: [PATCH] always now Views when needed --when View::Visibility::mustBeShown signal is triggered then the Views should always be shown even when KWin has hide it with no real reason --force appling activities to ALL View related windows when changing current Activity. This way we make sure that when KWin makes faulty assignments, Latte is coming to the rescue. --- app/view/view.cpp | 2 ++ app/view/visibilitymanager.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/app/view/view.cpp b/app/view/view.cpp index 650614569..283bdc57b 100644 --- a/app/view/view.cpp +++ b/app/view/view.cpp @@ -1144,6 +1144,8 @@ void View::setLayout(Layout::GenericLayout *layout) connectionsLayout << connect(latteCorona->activitiesConsumer(), &KActivities::Consumer::currentActivityChanged, this, [&]() { if (m_layout && m_visibility) { setActivities(m_layout->appliedActivities()); + //! update activities in case KWin did its magic and assigned windows to faulty activities + applyActivitiesToWindows(); showHiddenViewFromActivityStopping(); qDebug() << "DOCK VIEW FROM LAYOUT (currentActivityChanged) ::: " << m_layout->name() << " - activities: " << m_activities; } diff --git a/app/view/visibilitymanager.cpp b/app/view/visibilitymanager.cpp index 7839ffe1b..33b782c31 100644 --- a/app/view/visibilitymanager.cpp +++ b/app/view/visibilitymanager.cpp @@ -66,6 +66,12 @@ VisibilityManager::VisibilityManager(PlasmaQuick::ContainmentView *view) connect(this, &VisibilityManager::enableKWinEdgesChanged, this, &VisibilityManager::updateKWinEdgesSupport); connect(this, &VisibilityManager::modeChanged, this, &VisibilityManager::updateKWinEdgesSupport); + connect(this, &VisibilityManager::mustBeShown, this, [&]() { + if (m_latteView && !m_latteView->isVisible()) { + m_latteView->setVisible(true); + } + }); + if (m_latteView) { connect(m_latteView, &Latte::View::eventTriggered, this, &VisibilityManager::viewEventManager); connect(m_latteView, &Latte::View::behaveAsPlasmaPanelChanged , this, &VisibilityManager::updateKWinEdgesSupport);