summaryrefslogtreecommitdiff
path: root/src/desktop/Window.cpp
diff options
context:
space:
mode:
authorMaximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com>2025-01-26 12:23:39 +0000
committerGitHub <noreply@github.com>2025-01-26 13:23:39 +0100
commit3cd6e3960f0cbf500786497017ff3084cc9deb17 (patch)
treed5b579ec58481f4d5c71deb49d1f1a3f93f066c2 /src/desktop/Window.cpp
parent8b1d6e3009c540457068e23e6c2bc201d20ce4d1 (diff)
xwayland: fix pointer mismatches with multiple monitors (#9179)
Diffstat (limited to 'src/desktop/Window.cpp')
-rw-r--r--src/desktop/Window.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp
index 96b87205..b1b3c66c 100644
--- a/src/desktop/Window.cpp
+++ b/src/desktop/Window.cpp
@@ -1702,11 +1702,9 @@ void CWindow::sendWindowSize(Vector2D size, bool force, std::optional<Vector2D>
// TODO: this should be decoupled from setWindowSize IMO
Vector2D windowPos = overridePos.value_or(m_vRealPosition->goal());
- if (m_bIsX11 && PMONITOR) {
- windowPos -= PMONITOR->vecPosition; // normalize to monitor
- if (*PXWLFORCESCALEZERO)
- windowPos *= PMONITOR->scale; // scale if applicable
- windowPos += PMONITOR->vecXWaylandPosition; // move to correct position for xwayland
+ if (m_bIsX11) {
+ if (const auto XWAYLANDPOS = g_pXWaylandManager->waylandToXWaylandCoords(windowPos); XWAYLANDPOS != Vector2D{})
+ windowPos = XWAYLANDPOS;
}
if (!force && m_vPendingReportedSize == size && (windowPos == m_vReportedPosition || !m_bIsX11))