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.
pull/16/head
Michail Vourlakos 5 years ago
parent 06aef0e30d
commit ad074a6dab

@ -958,11 +958,12 @@ void View::setLayout(Layout::GenericLayout *layout)
});
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 {
//qDebug() << "View:: No needed reshow from timer 1...";
@ -970,14 +971,15 @@ void View::setLayout(Layout::GenericLayout *layout)
});
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...";
}
});

Loading…
Cancel
Save