mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-05 14:42:01 -07:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user