From 0208dff574ad87b89de59ee5a4f71781efbcff17 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 10 Nov 2022 19:39:16 +0000 Subject: [PATCH] fix invalid master slave pos calc on y != 0 --- src/layout/MasterLayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index 6584dc3b..f5d18512 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -227,7 +227,7 @@ void CHyprMasterLayout::calculateWorkspace(const int& ws) { if (nd.workspaceID != PWORKSPACE->m_iID || nd.isMaster) continue; - nd.position = Vector2D(PMASTERNODE->size.x + PMASTERNODE->position.x, nextY); + nd.position = PMONITOR->vecReservedTopLeft + PMONITOR->vecPosition + Vector2D(PMASTERNODE->percMaster * PMONITOR->vecSize.x, nextY); float HEIGHT = slavesLeft > 1 ? heightLeft / slavesLeft * nd.percSize : heightLeft; if (HEIGHT > heightLeft * 0.9f && slavesLeft > 1) HEIGHT = heightLeft * 0.9f;