summaryrefslogtreecommitdiff
path: root/src/layout/MasterLayout.cpp
diff options
context:
space:
mode:
authorMaarten van Gompel <proycon@anaproy.nl>2022-12-20 23:24:36 +0100
committerGitHub <noreply@github.com>2022-12-20 22:24:36 +0000
commitedcf4cd61d84b79049f625d9782ecc33160fdf58 (patch)
tree603c28412e1a78ffbe191e2795afdb7ae04590ae /src/layout/MasterLayout.cpp
parent261fbb5b62f43df2feb5a1128a420e32f2f476d4 (diff)
fix for gap in master layout orientation right #1171 (#1260)
Diffstat (limited to 'src/layout/MasterLayout.cpp')
-rw-r--r--src/layout/MasterLayout.cpp4
1 files 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);
}