fix clamp in monitor relative
This commit is contained in:
parent
7574b3db64
commit
70b5c1b119
1 changed files with 1 additions and 1 deletions
|
|
@ -1709,7 +1709,7 @@ CMonitor* CCompositor::getMonitorFromString(const std::string& name) {
|
||||||
currentPlace = currentPlace % m_vMonitors.size();
|
currentPlace = currentPlace % m_vMonitors.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentPlace != std::clamp(currentPlace, 0, (int)m_vMonitors.size())) {
|
if (currentPlace != std::clamp(currentPlace, 0, (int)m_vMonitors.size() - 1)) {
|
||||||
Debug::log(WARN, "Error in getMonitorFromString: Vaxry's code sucks.");
|
Debug::log(WARN, "Error in getMonitorFromString: Vaxry's code sucks.");
|
||||||
currentPlace = std::clamp(currentPlace, 0, (int)m_vMonitors.size() - 1);
|
currentPlace = std::clamp(currentPlace, 0, (int)m_vMonitors.size() - 1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue