mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 21:06:01 +01:00
fix up relative monitors
This commit is contained in:
parent
0803febac5
commit
050693be2e
1 changed files with 2 additions and 1 deletions
|
@ -1581,7 +1581,8 @@ CMonitor* CCompositor::getMonitorFromString(const std::string& name) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int offsetLeft = std::stoi(OFFSET) % m_vMonitors.size(); // no need to cycle more
|
int offsetLeft = std::stoi(OFFSET);
|
||||||
|
offsetLeft = offsetLeft < 0 ? -((-offsetLeft) % m_vMonitors.size()) : offsetLeft % m_vMonitors.size();
|
||||||
|
|
||||||
int currentPlace = 0;
|
int currentPlace = 0;
|
||||||
for (int i = 0; i < (int)m_vMonitors.size(); i++) {
|
for (int i = 0; i < (int)m_vMonitors.size(); i++) {
|
||||||
|
|
Loading…
Reference in a new issue