summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2023-06-04 21:33:48 +0200
committervaxerski <vaxry@vaxry.net>2023-06-04 21:35:23 +0200
commit2629cfeeab6aa7e4d7057d46c3f4f148802807f3 (patch)
tree609c1cb58b7052cfeb22062557bc304a2d5ef398 /src
parentd83e5b8409e92bb7e8e2b968b5fde25ac0c2171b (diff)
layouts: make aware of borderSize prop
Diffstat (limited to 'src')
-rw-r--r--src/layout/DwindleLayout.cpp7
-rw-r--r--src/layout/MasterLayout.cpp9
2 files changed, 9 insertions, 7 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp
index f433c573..5db9d771 100644
--- a/src/layout/DwindleLayout.cpp
+++ b/src/layout/DwindleLayout.cpp
@@ -122,9 +122,10 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for
static auto* const PGAPSOUT = &g_pConfigManager->getConfigValuePtr("general:gaps_out")->intValue;
static auto* const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue;
- auto gapsIn = WORKSPACERULE.gapsIn.value_or(*PGAPSIN);
- auto gapsOut = WORKSPACERULE.gapsOut.value_or(*PGAPSOUT);
- auto borderSize = WORKSPACERULE.borderSize.value_or(*PBORDERSIZE);
+ auto gapsIn = WORKSPACERULE.gapsIn.value_or(*PGAPSIN);
+ 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 (!g_pCompositor->windowExists(PWINDOW) || !PWINDOW->m_bIsMapped) {
Debug::log(ERR, "Node %lx holding invalid window %lx!!", pNode, PWINDOW);
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp
index f1e6b858..8f208fdb 100644
--- a/src/layout/MasterLayout.cpp
+++ b/src/layout/MasterLayout.cpp
@@ -274,7 +274,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)) {
@@ -491,9 +491,10 @@ void CHyprMasterLayout::applyNodeDataToWindow(SMasterNodeData* pNode) {
static auto* const PGAPSOUT = &g_pConfigManager->getConfigValuePtr("general:gaps_out")->intValue;
static auto* const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue;
- auto gapsIn = WORKSPACERULE.gapsIn.value_or(*PGAPSIN);
- auto gapsOut = WORKSPACERULE.gapsOut.value_or(*PGAPSOUT);
- auto borderSize = WORKSPACERULE.borderSize.value_or(*PBORDERSIZE);
+ auto gapsIn = WORKSPACERULE.gapsIn.value_or(*PGAPSIN);
+ 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 (!g_pCompositor->windowValidMapped(PWINDOW)) {
Debug::log(ERR, "Node %lx holding invalid window %lx!!", pNode, PWINDOW);