xdg: minor improvements to initial size reporting

fixes #4918
This commit is contained in:
Vaxry
2024-03-02 18:53:11 +00:00
parent be89d6faa9
commit d2289d8327
5 changed files with 9 additions and 13 deletions

View File

@@ -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}};