From c0d9dcc586ab17bf67c48c02a08bca28727f9237 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 17 Dec 2023 14:53:48 +0000 Subject: [PATCH] xwayland: set reported and pending size/pos on geometry sets --- src/events/Windows.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 390fb1e1..b184f4c2 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -1030,7 +1030,8 @@ void Events::listener_configureX11(void* owner, void* data) { if (!PWINDOW->m_uSurface.xwayland->surface || !PWINDOW->m_uSurface.xwayland->surface->mapped || !PWINDOW->m_bMappedX11) { wlr_xwayland_surface_configure(PWINDOW->m_uSurface.xwayland, E->x, E->y, E->width, E->height); - PWINDOW->m_vReportedSize = {E->width, E->height}; + PWINDOW->m_vPendingReportedSize = {E->width, E->height}; + PWINDOW->m_vReportedSize = {E->width, E->height}; return; } @@ -1067,7 +1068,8 @@ void Events::listener_configureX11(void* owner, void* data) { wlr_xwayland_surface_configure(PWINDOW->m_uSurface.xwayland, E->x, E->y, E->width, E->height); - PWINDOW->m_vReportedSize = {E->width, E->height}; + PWINDOW->m_vPendingReportedSize = {E->width, E->height}; + PWINDOW->m_vReportedSize = {E->width, E->height}; PWINDOW->updateWindowDecos(); @@ -1137,6 +1139,10 @@ void Events::listener_unmanagedSetGeometry(void* owner, void* data) { g_pCompositor->changeWindowZOrder(PWINDOW, true); PWINDOW->updateWindowDecos(); g_pHyprRenderer->damageWindow(PWINDOW); + + PWINDOW->m_vReportedPosition = PWINDOW->m_vRealPosition.goalv(); + PWINDOW->m_vReportedSize = PWINDOW->m_vRealSize.goalv(); + PWINDOW->m_vPendingReportedSize = PWINDOW->m_vReportedSize; } }