From edcf4cd61d84b79049f625d9782ecc33160fdf58 Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Tue, 20 Dec 2022 23:24:36 +0100 Subject: [PATCH] fix for gap in master layout orientation right #1171 (#1260) --- src/layout/MasterLayout.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index 775760f2..11c00109 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -240,7 +240,7 @@ void CHyprMasterLayout::calculateWorkspace(const int& ws) { for (auto& n : m_lMasterNodesData) { if (n.workspaceID == PWORKSPACE->m_iID && n.isMaster) { if (PWORKSPACEDATA->orientation == ORIENTATION_RIGHT) { - n.position = PMONITOR->vecReservedTopLeft + PMONITOR->vecPosition + Vector2D(PMONITOR->vecSize.x - WIDTH, nextY); + n.position = PMONITOR->vecReservedTopLeft + PMONITOR->vecPosition + Vector2D(PMONITOR->vecSize.x - WIDTH - PMONITOR->vecReservedBottomRight.x - PMONITOR->vecReservedTopLeft.x, nextY); } else { n.position = PMONITOR->vecReservedTopLeft + PMONITOR->vecPosition + Vector2D(0, nextY); } @@ -265,7 +265,7 @@ void CHyprMasterLayout::calculateWorkspace(const int& ws) { for (auto& n : m_lMasterNodesData) { if (n.workspaceID == PWORKSPACE->m_iID && n.isMaster) { if (PWORKSPACEDATA->orientation == ORIENTATION_BOTTOM) { - n.position = PMONITOR->vecReservedTopLeft + PMONITOR->vecPosition + Vector2D(nextX, PMONITOR->vecSize.y - HEIGHT - PMONITOR->vecReservedBottomRight.y); + n.position = PMONITOR->vecReservedTopLeft + PMONITOR->vecPosition + Vector2D(nextX, PMONITOR->vecSize.y - HEIGHT - PMONITOR->vecReservedBottomRight.y - PMONITOR->vecReservedTopLeft.y); } else { n.position = PMONITOR->vecReservedTopLeft + PMONITOR->vecPosition + Vector2D(nextX, 0); }