fix: hyprland crashing wenn moving window -1 from first monitor (#1419)

Co-authored-by: xVermillionx <xVermillionx@notvalid>
This commit is contained in:
DB 2023-01-23 21:56:05 +01:00 committed by GitHub
parent cb6e36d804
commit 7574b3db64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1704,7 +1704,7 @@ CMonitor* CCompositor::getMonitorFromString(const std::string& name) {
currentPlace += offsetLeft; currentPlace += offsetLeft;
if (currentPlace < 0) { if (currentPlace < 0) {
currentPlace = m_vMonitors.size() - currentPlace; currentPlace = m_vMonitors.size() + currentPlace;
} else { } else {
currentPlace = currentPlace % m_vMonitors.size(); currentPlace = currentPlace % m_vMonitors.size();
} }