mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 22:22:00 -07:00
added center windowrule
This commit is contained in:
@@ -571,6 +571,7 @@ void CConfigManager::handleWindowRule(const std::string& command, const std::str
|
|||||||
&& RULE.find("monitor") != 0
|
&& RULE.find("monitor") != 0
|
||||||
&& RULE != "nofocus"
|
&& RULE != "nofocus"
|
||||||
&& RULE != "noblur"
|
&& RULE != "noblur"
|
||||||
|
&& RULE != "center"
|
||||||
&& RULE != "fullscreen"
|
&& RULE != "fullscreen"
|
||||||
&& RULE.find("animation") != 0
|
&& RULE.find("animation") != 0
|
||||||
&& RULE.find("rounding") != 0
|
&& RULE.find("rounding") != 0
|
||||||
|
@@ -224,6 +224,8 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
|||||||
} catch (...) {
|
} catch (...) {
|
||||||
Debug::log(LOG, "Rule move failed, rule: %s -> %s", r.szRule.c_str(), r.szValue.c_str());
|
Debug::log(LOG, "Rule move failed, rule: %s -> %s", r.szRule.c_str(), r.szValue.c_str());
|
||||||
}
|
}
|
||||||
|
} else if (r.szRule == "center") {
|
||||||
|
PWINDOW->m_vRealPosition = PMONITOR->vecPosition + PMONITOR->vecSize / 2.f - PWINDOW->m_vRealSize.goalv() / 2.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user