Fix Workspace::inUpdateClientArea() with auto-hide panels

If there's an auto-hide panel, m_oldRestrictedAreas will be empty, which
will break AbstractClient::checkWorkspacePosition().
This commit is contained in:
Vlad Zahorodnii 2021-10-30 13:43:08 +03:00
parent 6faf4ec3a2
commit ee41e9b6e7
2 changed files with 4 additions and 1 deletions

View file

@ -2254,6 +2254,7 @@ void Workspace::updateClientArea()
m_workAreas = workAreas;
m_screenAreas = screenAreas;
m_inUpdateClientArea = true;
m_oldRestrictedAreas = m_restrictedAreas;
m_restrictedAreas = restrictedAreas;
@ -2276,6 +2277,7 @@ void Workspace::updateClientArea()
}
m_oldRestrictedAreas.clear(); // reset, no longer valid or needed
m_inUpdateClientArea = false;
}
}
@ -2397,7 +2399,7 @@ QRegion Workspace::restrictedMoveArea(const VirtualDesktop *desktop, StrutAreas
bool Workspace::inUpdateClientArea() const
{
return !m_oldRestrictedAreas.isEmpty();
return m_inUpdateClientArea;
}
QRegion Workspace::previousRestrictedMoveArea(const VirtualDesktop *desktop, StrutAreas areas) const

View file

@ -673,6 +673,7 @@ private:
QHash<const AbstractOutput *, QRect> m_oldScreenGeometries;
QSize olddisplaysize; // previous sizes od displayWidth()/displayHeight()
QHash<const VirtualDesktop *, StrutRects> m_oldRestrictedAreas;
bool m_inUpdateClientArea = false;
int set_active_client_recursion;
int block_stacking_updates; // When > 0, stacking updates are temporarily disabled