algo/master: fix master:orientation being a noop

This commit is contained in:
Vaxry 2026-02-24 11:36:51 +00:00
parent 5a80bc120a
commit be893a81b4
No known key found for this signature in database
GPG key ID: 665806380871D640

View file

@ -870,10 +870,14 @@ void CMasterAlgorithm::runOrientationCycle(Hyprutils::String::CVarList2* vars, i
}
eOrientation CMasterAlgorithm::getDynamicOrientation() {
static auto PORIENT = CConfigValue<std::string>("master:orientation");
const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(m_parent->space()->workspace());
std::string orientationString;
if (WORKSPACERULE.layoutopts.contains("orientation"))
orientationString = WORKSPACERULE.layoutopts.at("orientation");
else
orientationString = *PORIENT;
eOrientation orientation = m_workspaceData.orientation;
// override if workspace rule is set