respect size in setgeo unmanaged x11

This commit is contained in:
vaxerski 2022-07-11 15:31:31 +02:00
parent 2936368e80
commit c923b0e538

View file

@ -501,10 +501,12 @@ void Events::listener_unmanagedSetGeometry(void* owner, void* data) {
return; return;
const auto POS = PWINDOW->m_vRealPosition.goalv(); const auto POS = PWINDOW->m_vRealPosition.goalv();
const auto SIZ = PWINDOW->m_vRealSize.goalv();
if (floor(POS.x) != PWINDOW->m_uSurface.xwayland->x || floor(POS.x) != PWINDOW->m_uSurface.xwayland->y) { if (floor(POS.x) != PWINDOW->m_uSurface.xwayland->x || floor(POS.x) != PWINDOW->m_uSurface.xwayland->y || floor(SIZ.x) != PWINDOW->m_uSurface.xwayland->width || floor(SIZ.y) != PWINDOW->m_uSurface.xwayland->height) {
g_pHyprRenderer->damageWindow(PWINDOW); g_pHyprRenderer->damageWindow(PWINDOW);
PWINDOW->m_vRealPosition.setValueAndWarp(Vector2D(PWINDOW->m_uSurface.xwayland->x, PWINDOW->m_uSurface.xwayland->y)); PWINDOW->m_vRealPosition.setValueAndWarp(Vector2D(PWINDOW->m_uSurface.xwayland->x, PWINDOW->m_uSurface.xwayland->y));
PWINDOW->m_vRealSize.setValueAndWarp(Vector2D(PWINDOW->m_uSurface.xwayland->width, PWINDOW->m_uSurface.xwayland->height));
g_pXWaylandManager->setWindowSize(PWINDOW, PWINDOW->m_vRealSize.vec()); g_pXWaylandManager->setWindowSize(PWINDOW, PWINDOW->m_vRealSize.vec());
g_pCompositor->moveWindowToTop(PWINDOW); g_pCompositor->moveWindowToTop(PWINDOW);
g_pHyprRenderer->damageWindow(PWINDOW); g_pHyprRenderer->damageWindow(PWINDOW);