diff options
| author | vaxerski <vaxry@vaxry.net> | 2023-08-15 19:15:37 +0200 |
|---|---|---|
| committer | vaxerski <vaxry@vaxry.net> | 2023-08-15 19:15:37 +0200 |
| commit | 91e28bbe9df85e2e94fbcc0137106362aea14ab5 (patch) | |
| tree | c2199ee9918e8905a52e91d5d3ea8d5d59443b81 /src/Compositor.cpp | |
| parent | 2b4537606f604f29b2d42d7be369182831269958 (diff) | |
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
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 348ac584..bb1f4f92 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -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); + } } |
