master: fix swapped workspaces (#5397)

This commit is contained in:
thejch 2024-04-02 17:22:59 -07:00 committed by GitHub
parent 3965faafac
commit fbdaf74a82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -809,7 +809,7 @@ void CHyprMasterLayout::resizeActiveWindow(const Vector2D& pixResize, eRectCorne
default: UNREACHABLE(); default: UNREACHABLE();
} }
const auto workspaceIdForResizing = PMONITOR->activeSpecialWorkspace ? PMONITOR->activeWorkspaceID() : PMONITOR->activeSpecialWorkspaceID(); const auto workspaceIdForResizing = PMONITOR->activeSpecialWorkspace ? PMONITOR->activeSpecialWorkspaceID() : PMONITOR->activeWorkspaceID();
for (auto& n : m_lMasterNodesData) { for (auto& n : m_lMasterNodesData) {
if (n.isMaster && n.workspaceID == workspaceIdForResizing) if (n.isMaster && n.workspaceID == workspaceIdForResizing)
n.percMaster = std::clamp(n.percMaster + delta, 0.05, 0.95); n.percMaster = std::clamp(n.percMaster + delta, 0.05, 0.95);