move workspaces and not windows on mon disconnect

This commit is contained in:
vaxerski
2022-05-30 20:44:14 +02:00
parent 1f4c938c67
commit eee9698ec9
4 changed files with 22 additions and 10 deletions

View File

@@ -592,7 +592,7 @@ CWorkspace* CCompositor::getWorkspaceByID(const int& id) {
void CCompositor::sanityCheckWorkspaces() {
for (auto it = m_lWorkspaces.begin(); it != m_lWorkspaces.end(); ++it) {
if (getWindowsOnWorkspace(it->m_iID) == 0 && !isWorkspaceVisible(it->m_iID)) {
if ((getWindowsOnWorkspace(it->m_iID) == 0 && !isWorkspaceVisible(it->m_iID))) {
it = m_lWorkspaces.erase(it);
}
}