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) { for (auto& work : temp) {
if (!isWorkspaceVisible(work.getID())) { if (!isWorkspaceVisible(work.getID())) {
// check if it has any children // check if it has any children
bool hasChildren = false; bool hasChildren = getWindowsOnWorkspace(work.getID()) > 0;
for (auto& window : windows) {
if (window.getWorkspaceID() == work.getID()) {
hasChildren = true;
break;
}
}
if (hasChildren) { if (hasChildren) {
// Has windows opened on it. // Has windows opened on it.