From a9b498923689528e00a3ceff96df8aecda3328ad Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Sat, 7 Sep 2019 20:33:43 +0300 Subject: [PATCH] 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 --- app/wm/tracker/windowstracker.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/app/wm/tracker/windowstracker.cpp b/app/wm/tracker/windowstracker.cpp index 3fc6cc1e8..063fb03c6 100644 --- a/app/wm/tracker/windowstracker.cpp +++ b/app/wm/tracker/windowstracker.cpp @@ -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()); + } } }