wayland:fix struts crash

--when struts thickness during startup was zero
that was creating an invalid window geometry under
wayland and subsequently it was crashing the app.

BUG:431381
work/spdx
Michail Vourlakos 4 years ago
parent 09294b8599
commit 15c3b3630a

@ -383,11 +383,11 @@ void VisibilityManager::setMode(Latte::Types::Visibility mode)
void VisibilityManager::updateStrutsBasedOnLayoutsAndActivities(bool forceUpdate)
{
bool multipleLayoutsAndCurrent = (m_corona->layoutsManager()->memoryUsage() == MemoryUsage::MultipleLayouts
bool inMultipleLayoutsAndCurrent = (m_corona->layoutsManager()->memoryUsage() == MemoryUsage::MultipleLayouts
&& m_latteView->layout() && !m_latteView->positioner()->inLocationAnimation()
&& m_latteView->layout()->isCurrent());
if (m_corona->layoutsManager()->memoryUsage() == MemoryUsage::SingleLayout || multipleLayoutsAndCurrent) {
if (m_strutsThickness>0 && (m_corona->layoutsManager()->memoryUsage() == MemoryUsage::SingleLayout || inMultipleLayoutsAndCurrent)) {
QRect computedStruts = acceptableStruts();
if (m_publishedStruts != computedStruts || forceUpdate) {
//! Force update is needed when very important events happen in DE and there is a chance

Loading…
Cancel
Save