diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-03-02 18:53:11 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-03-02 18:53:17 +0000 |
| commit | d2289d8327d46e6b55c06b3c639fc138c3e02d1a (patch) | |
| tree | cf37461b01347ca82e302a9d3afa1acae49937d6 /src/layout/DwindleLayout.cpp | |
| parent | be89d6faa988f6bd33a66f02746872c649a16180 (diff) | |
xdg: minor improvements to initial size reporting
fixes #4918
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
| -rw-r--r-- | src/layout/DwindleLayout.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
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}}; |
