mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 21:25:58 +01:00
err on invalid transform in monitor cfg
This commit is contained in:
parent
ef12120270
commit
b2314aa33a
1 changed files with 7 additions and 0 deletions
|
@ -447,6 +447,13 @@ void CConfigManager::handleMonitor(const std::string& command, const std::string
|
|||
if (ARGS[1] == "disable" || ARGS[1] == "disabled")
|
||||
newrule.disabled = true;
|
||||
else if (ARGS[1] == "transform") {
|
||||
const auto TSF = std::stoi(ARGS[2]);
|
||||
if (std::clamp(TSF, 0, 7) != TSF) {
|
||||
Debug::log(ERR, "invalid transform %i in monitor", TSF);
|
||||
parseError = "invalid transform";
|
||||
return;
|
||||
}
|
||||
|
||||
wl_output_transform transform = (wl_output_transform)std::stoi(ARGS[2]);
|
||||
|
||||
// overwrite if exists
|
||||
|
|
Loading…
Reference in a new issue