1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-28 18:50:40 +03:00

improve View workarounds for kwin activities

--improve the new worksarounds in order to always
apply the activities that a view and its windows are
present when the workarounds were triggered from
kwin faulty behavior. The kwin faulty behavior is
that when any activity is paused then all Latte::Views
become hidden and lose their activities references.
The workarounds are timers that when they trace
a faulty visible state !visible are restoring the
normal behavior to views.
This commit is contained in:
Michail Vourlakos 2020-01-04 19:57:54 +02:00
parent 06aef0e30d
commit ad074a6dab

View File

@ -957,27 +957,29 @@ void View::setLayout(Layout::GenericLayout *layout)
}
});
connectionsLayout << connect(&m_visibleHackTimer1, &QTimer::timeout, this, [&]() {
connectionsLayout << connect(&m_visibleHackTimer1, &QTimer::timeout, this, [&]() {
applyActivitiesToWindows();
emit activitiesChanged();
if (m_layout && !inDelete() & !isVisible()) {
show();
applyActivitiesToWindows();
//qDebug() << "View:: Enforce reshow from timer 1...";
emit activitiesChanged();
emit forcedShown();
} else {
} else {
//qDebug() << "View:: No needed reshow from timer 1...";
}
});
connectionsLayout << connect(&m_visibleHackTimer2, &QTimer::timeout, this, [&]() {
if (m_layout && !inDelete() && !isVisible()) {
applyActivitiesToWindows();
emit activitiesChanged();
if (m_layout && !inDelete() & !isVisible()) {
show();
applyActivitiesToWindows();
//qDebug() << "View:: Enforce reshow from timer 2...";
emit activitiesChanged();
//qDebug() << "View:: Enforce reshow from timer 1...";
emit forcedShown();
} else {
//qDebug() << "View:: No needed reshow from timer 2...";
//qDebug() << "View:: No needed reshow from timer 1...";
}
});