From cd483a7a37c6024347659974701a76703c6e3a3a Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 3 Aug 2022 15:25:30 +0200 Subject: [PATCH] ignore borders in nogapswhenonly --- src/layout/DwindleLayout.cpp | 4 ++-- src/layout/MasterLayout.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index ceb9a005..6abcaf5f 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -143,8 +143,8 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for auto calcSize = PWINDOW->m_vSize - Vector2D(2 * BORDERSIZE, 2 * BORDERSIZE); if (*PNOGAPSWHENONLY && PWINDOW->m_iWorkspaceID != SPECIAL_WORKSPACE_ID && getNodesOnWorkspace(PWINDOW->m_iWorkspaceID) == 1) { - PWINDOW->m_vRealPosition = calcPos; - PWINDOW->m_vRealSize = calcSize; + PWINDOW->m_vRealPosition = calcPos - Vector2D(BORDERSIZE, BORDERSIZE); + PWINDOW->m_vRealSize = calcSize + Vector2D(2 * BORDERSIZE, 2 * BORDERSIZE); PWINDOW->updateWindowDecos(); diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index 5199f76f..b7f03c3d 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -215,8 +215,8 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) { auto calcSize = PWINDOW->m_vSize - Vector2D(2 * BORDERSIZE, 2 * BORDERSIZE); if (*PNOGAPSWHENONLY && PWINDOW->m_iWorkspaceID != SPECIAL_WORKSPACE_ID && getNodesOnWorkspace(PWINDOW->m_iWorkspaceID) == 1) { - PWINDOW->m_vRealPosition = calcPos; - PWINDOW->m_vRealSize = calcSize; + PWINDOW->m_vRealPosition = calcPos - Vector2D(BORDERSIZE, BORDERSIZE); + PWINDOW->m_vRealSize = calcSize + Vector2D(2 * BORDERSIZE, 2 * BORDERSIZE); PWINDOW->updateWindowDecos();