From 716da3d04e92d8926739c526e2ae0ae274678b55 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 11 Mar 2022 19:29:21 +0100 Subject: [PATCH] fix dock preventing workspace from closing --- src/windowManager.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/windowManager.cpp b/src/windowManager.cpp index df24510..50e7718 100644 --- a/src/windowManager.cpp +++ b/src/windowManager.cpp @@ -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.