diff options
author | thejch <[email protected]> | 2024-04-12 17:54:18 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-13 01:54:18 +0100 |
commit | 34396f55a283e5fe332ed7e1b8fd814840808ae5 (patch) | |
tree | 1d44887ac9742eec1ad3ccf23fd4309c1745e093 /src/layout/MasterLayout.cpp | |
parent | 0c513ba91bd73106be99e35b1a020d24e5ae874a (diff) | |
download | Hyprland-34396f55a283e5fe332ed7e1b8fd814840808ae5.tar.gz Hyprland-34396f55a283e5fe332ed7e1b8fd814840808ae5.zip |
master: change the mfact dispatcher to use splitratio (#4766)
* master layout: change the mfact dispatcher to use splitratio
* add space for concat
Diffstat (limited to 'src/layout/MasterLayout.cpp')
-rw-r--r-- | src/layout/MasterLayout.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index e2b8270d..0999303f 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -1285,19 +1285,7 @@ std::any CHyprMasterLayout::layoutMessage(SLayoutMessageHeader header, std::stri } else if (command == "orientationcycle") { runOrientationCycle(header, &vars, 1); } else if (command == "mfact") { - if (vars.size() >= 2) { - float newMfact = 0; - try { - newMfact = std::stof(vars[1]); - } catch (std::exception& e) { - Debug::log(ERR, "Argument is invalid: {}", e.what()); - return 0; - } - for (auto& nd : m_lMasterNodesData) { - if (nd.isMaster) - nd.percMaster = std::clamp(newMfact, 0.05f, 0.95f); - } - } + g_pKeybindManager->m_mDispatchers["splitratio"](vars[1] + " " + vars[2]); } else if (command == "rollnext") { const auto PWINDOW = header.pWindow; const auto PNODE = getNodeFromWindow(PWINDOW); |