fix dock preventing workspace from closing

This commit is contained in:
vaxerski 2022-03-11 19:29:21 +01:00
parent daf76c5f54
commit 716da3d04e

View file

@ -372,13 +372,7 @@ void CWindowManager::cleanupUnusedWorkspaces() {
for (auto& work : temp) {
if (!isWorkspaceVisible(work.getID())) {
// check if it has any children
bool hasChildren = false;
for (auto& window : windows) {
if (window.getWorkspaceID() == work.getID()) {
hasChildren = true;
break;
}
}
bool hasChildren = getWindowsOnWorkspace(work.getID()) > 0;
if (hasChildren) {
// Has windows opened on it.