1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-25 19:21:41 +03:00

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.
This commit is contained in:
Michail Vourlakos 2020-07-18 19:40:31 +03:00
parent 81bc74f49d
commit cf1cb1ca8e
2 changed files with 8 additions and 0 deletions

View File

@ -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;
}

View File

@ -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);