From 2c7b2ad6ca19950f13ec4a97204bb8ff18096bb3 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 18 Jul 2023 00:11:29 +0200 Subject: windowrules: add border size rule --- src/layout/MasterLayout.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/layout/MasterLayout.cpp') diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index e0000914..5a9d252e 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -294,7 +294,7 @@ void CHyprMasterLayout::calculateWorkspace(const int& ws) { if ((WINDOWS < 2) && !centerMasterWindow) { PMASTERNODE->position = PMONITOR->vecReservedTopLeft + PMONITOR->vecPosition; PMASTERNODE->size = Vector2D(PMONITOR->vecSize.x - PMONITOR->vecReservedTopLeft.x - PMONITOR->vecReservedBottomRight.x, - PMONITOR->vecSize.y - PMONITOR->vecReservedBottomRight.y - PMONITOR->vecReservedTopLeft.y); + PMONITOR->vecSize.y - PMONITOR->vecReservedBottomRight.y - PMONITOR->vecReservedTopLeft.y); applyNodeDataToWindow(PMASTERNODE); return; } else if (orientation == ORIENTATION_LEFT || orientation == ORIENTATION_RIGHT || (orientation == ORIENTATION_CENTER && STACKWINDOWS <= 1)) { @@ -515,6 +515,8 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) { auto gapsOut = WORKSPACERULE.gapsOut.value_or(*PGAPSOUT); auto borderSize = PWINDOW->m_sSpecialRenderData.borderSize.toUnderlying() != -1 ? PWINDOW->m_sSpecialRenderData.borderSize.toUnderlying() : WORKSPACERULE.borderSize.value_or(*PBORDERSIZE); + if (PWINDOW->m_sAdditionalConfigData.borderSize.toUnderlying() != -1) + borderSize = PWINDOW->m_sAdditionalConfigData.borderSize.toUnderlying(); if (!g_pCompositor->windowValidMapped(PWINDOW)) { Debug::log(ERR, "Node %lx holding invalid window %lx!!", pNode, PWINDOW); -- cgit v1.2.3