diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index f5d18512..a59d8388 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -119,7 +119,7 @@ void CHyprMasterLayout::onWindowRemovedTiling(CWindow* pWindow) { if (PNODE->isMaster && MASTERSLEFT < 2) { // find new one for (auto& nd : m_lMasterNodesData) { - if (!nd.isMaster) { + if (!nd.isMaster && nd.workspaceID == PNODE->workspaceID) { nd.isMaster = true; break; }