update AllScreens track information during startup

--Whenever a view is updating its layout then the AllScreens
tracked information [per layout tracking] should be updated
also. Until now this was happening only during startup and there
was a case that if during startup a view was requesting tracking
and the second one did not, then tracking for the entire layout
for all screens it could be faulty disabled.

BUG:411670
FIXED-IN:0.9.3
pull/8/head
Michail Vourlakos 6 years ago
parent c264a0a9e3
commit eb3639914b

@ -198,12 +198,23 @@ void Windows::removeView(Latte::View *view)
void Windows::addRelevantLayout(Latte::View *view)
{
if (view->layout() && !m_layouts.contains(view->layout())) {
m_layouts[view->layout()] = new TrackedLayoutInfo(this, view->layout());
if (view->layout()) {
bool initializing {false};
if (!m_layouts.contains(view->layout())) {
initializing = true;
m_layouts[view->layout()] = new TrackedLayoutInfo(this, view->layout());
}
//! Update always the AllScreens tracking because there is a chance a view delayed to be assigned in a layout
//! and that could create a state the AllScreens tracking will be disabled if there is a View requesting
//! tracking and one that it does not during startup
updateRelevantLayouts();
updateHints(view->layout());
emit informationAnnouncedForLayout(view->layout());
if (initializing) {
updateHints(view->layout());
emit informationAnnouncedForLayout(view->layout());
}
}
}

Loading…
Cancel
Save