From d2289d8327d46e6b55c06b3c639fc138c3e02d1a Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 2 Mar 2024 18:53:11 +0000 Subject: xdg: minor improvements to initial size reporting fixes #4918 --- src/layout/DwindleLayout.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/layout/DwindleLayout.cpp') diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index fda93e97..a08dfa9e 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -1124,12 +1124,9 @@ Vector2D CHyprDwindleLayout::predictSizeForNewWindow() { static auto* const PPRESERVESPLIT = (Hyprlang::INT* const*)g_pConfigManager->getConfigValuePtr("dwindle:preserve_split"); static auto* const PFLMULT = (Hyprlang::FLOAT* const*)g_pConfigManager->getConfigValuePtr("dwindle:split_width_multiplier"); - bool splitTop = false; + bool splitTop = box.h * **PFLMULT > box.w; - if (**PPRESERVESPLIT == 0 && **PSMARTSPLIT == 0) - splitTop = box.h * **PFLMULT > box.w; - - const auto SPLITSIDE = !splitTop; + const auto SPLITSIDE = !splitTop; if (SPLITSIDE) node.box = {{}, {box.w / 2.0, box.h}}; -- cgit v1.2.3