mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-09-11 21:27:20 +03:00
compositor: don't apply offsets in renderer
This commit is contained in:
parent
2110dc1f03
commit
b9a783229b
@ -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 New Issue
Block a user