mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 01:25:58 +01:00
compositor: don't apply offsets in renderer
This commit is contained in:
parent
2110dc1f03
commit
b9a783229b
2 changed files with 1 additions and 19 deletions
|
@ -2496,7 +2496,7 @@ void CCompositor::arrangeMonitors() {
|
|||
for (auto it = toArrange.begin(); it != toArrange.end(); ++it) {
|
||||
auto m = *it;
|
||||
|
||||
if (m->activeMonitorRule.offset > Vector2D{-1, -1}) {
|
||||
if (m->activeMonitorRule.offset.x >= 0 && m->activeMonitorRule.offset.y >= 0) {
|
||||
// explicit.
|
||||
m->moveTo(m->activeMonitorRule.offset);
|
||||
arranged.push_back(m);
|
||||
|
|
|
@ -1879,24 +1879,6 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
|
|||
pMonitor->vecPixelSize = Vector2D(transformedBox.width, transformedBox.height);
|
||||
}
|
||||
|
||||
if (pMonitorRule->offset == Vector2D(-1, -1) && pMonitor->vecPosition == Vector2D(-1, -1)) {
|
||||
// let's find manually a sensible position for it, to the right.
|
||||
Vector2D finalPos;
|
||||
|
||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||
if (m->ID == pMonitor->ID)
|
||||
continue;
|
||||
|
||||
if (m->vecPosition.x + std::ceil(m->vecSize.x) > finalPos.x) {
|
||||
finalPos.x = m->vecPosition.x + std::ceil(m->vecSize.x);
|
||||
}
|
||||
}
|
||||
|
||||
pMonitor->vecPosition = finalPos;
|
||||
} else if (pMonitorRule->offset != Vector2D(-1, -1)) {
|
||||
pMonitor->vecPosition = pMonitorRule->offset;
|
||||
}
|
||||
|
||||
wlr_output_enable(pMonitor->output, 1);
|
||||
|
||||
// update renderer (here because it will call rollback, so we cannot do this before committing)
|
||||
|
|
Loading…
Reference in a new issue