mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-25 17:21:54 -07:00
xwayland: fix pointer mismatches with multiple monitors (#9179)
This commit is contained in:
committed by
GitHub
parent
8b1d6e3009
commit
3cd6e3960f
@@ -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))
|
||||
|
Reference in New Issue
Block a user