diff options
| author | Rico <muench.rico@gmail.com> | 2025-08-02 15:24:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-02 15:24:18 +0200 |
| commit | f1f1161c179374f7f703f7a17b1680205904cc90 (patch) | |
| tree | c8af04b53d9ba22ce36470e20c4e9b8a4c679b0d /src/layout/DwindleLayout.cpp | |
| parent | e1e23eb9bdeed9d4d166e6d7bf07e0be983728f4 (diff) | |
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
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 6 |
1 files 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<Hyprlang::VEC2>("dwindle:single_window_aspect_ratio"); + const static auto REQUESTEDRATIO = CConfigValue<Hyprlang::VEC2>("dwindle:single_window_aspect_ratio"); const static auto REQUESTEDRATIOTOLERANCE = CConfigValue<Hyprlang::FLOAT>("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) { |
