xwayland: use a completely separate coordinate system

Use a completely separate coordinate system for XWayland. This fixes all issues with force_zero_scaling overlaps.

Fixes #2916
This commit is contained in:
vaxerski
2023-08-15 19:15:37 +02:00
parent 2b4537606f
commit 91e28bbe9d
5 changed files with 41 additions and 52 deletions

View File

@@ -2487,6 +2487,8 @@ void CCompositor::setIdleActivityInhibit(bool enabled) {
}
void CCompositor::arrangeMonitors() {
static auto* const PXWLFORCESCALEZERO = &g_pConfigManager->getConfigValuePtr("xwayland:force_zero_scaling")->intValue;
std::vector<CMonitor*> toArrange;
std::vector<CMonitor*> arranged;
@@ -2522,4 +2524,12 @@ void CCompositor::arrangeMonitors() {
m->moveTo({maxOffset, 0});
maxOffset += m->vecPosition.x + m->vecSize.x;
}
// reset maxOffset (reuse)
// and set xwayland positions aka auto for all
maxOffset = 0;
for (auto& m : m_vMonitors) {
m->vecXWaylandPosition = {maxOffset, 0};
maxOffset += (*PXWLFORCESCALEZERO ? m->vecTransformedSize.x : m->vecSize.x);
}
}