From f1f1161c179374f7f703f7a17b1680205904cc90 Mon Sep 17 00:00:00 2001 From: Rico Date: Sat, 2 Aug 2025 15:24:18 +0200 Subject: [PATCH] dwindle: fix single_window_aspect_ratio not updating with config reload (#11305) * dwindle: fix single_window_aspect_ratio not updating with config reload * refactor: dereference instead of using ptr method --- src/layout/DwindleLayout.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 7dd34434..d844ea41 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -155,15 +155,15 @@ void CHyprDwindleLayout::applyNodeDataToWindow(SDwindleNodeData* pNode, bool for auto calcPos = PWINDOW->m_position; auto calcSize = PWINDOW->m_size; - const static auto REQUESTEDRATIO = *CConfigValue("dwindle:single_window_aspect_ratio"); + const static auto REQUESTEDRATIO = CConfigValue("dwindle:single_window_aspect_ratio"); const static auto REQUESTEDRATIOTOLERANCE = CConfigValue("dwindle:single_window_aspect_ratio_tolerance"); Vector2D ratioPadding; - if (REQUESTEDRATIO.y != 0 && !pNode->pParent) { + if ((*REQUESTEDRATIO).y != 0 && !pNode->pParent) { const Vector2D originalSize = PMONITOR->m_size - PMONITOR->m_reservedTopLeft - PMONITOR->m_reservedBottomRight; - const double requestedRatio = REQUESTEDRATIO.x / REQUESTEDRATIO.y; + const double requestedRatio = (*REQUESTEDRATIO).x / (*REQUESTEDRATIO).y; const double originalRatio = originalSize.x / originalSize.y; if (requestedRatio > originalRatio) {