diff options
author | vaxerski <[email protected]> | 2022-07-12 14:14:12 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-07-12 14:14:12 +0200 |
commit | b1e3430405850c24035c8c1f70ebea99a707135a (patch) | |
tree | e618fdd030a37703d42236682240a07c9fca486d | |
parent | a4f82491b7e825255253a1fbea509e823b73115b (diff) | |
download | Hyprland-b1e3430405850c24035c8c1f70ebea99a707135a.tar.gz Hyprland-b1e3430405850c24035c8c1f70ebea99a707135a.zip |
only set xwayland size/pos on reasonable deltasv0.7.0beta
-rw-r--r-- | src/events/Windows.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 71f1775f..3d46931e 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -509,10 +509,13 @@ void Events::listener_unmanagedSetGeometry(void* owner, void* data) { 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 || floor(SIZ.x) != PWINDOW->m_uSurface.xwayland->width || floor(SIZ.y) != PWINDOW->m_uSurface.xwayland->height) { + if (abs(floor(POS.x) - PWINDOW->m_uSurface.xwayland->x) > 2 || abs(floor(POS.y) - PWINDOW->m_uSurface.xwayland->y) > 2 || abs(floor(SIZ.x) - PWINDOW->m_uSurface.xwayland->width) > 2 || abs(floor(SIZ.y) - PWINDOW->m_uSurface.xwayland->height) > 2) { g_pHyprRenderer->damageWindow(PWINDOW); 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)); + + if (abs(floor(SIZ.x) - PWINDOW->m_uSurface.xwayland->width) > 2 || abs(floor(SIZ.y) - PWINDOW->m_uSurface.xwayland->height) > 2) + PWINDOW->m_vRealSize.setValueAndWarp(Vector2D(PWINDOW->m_uSurface.xwayland->width, PWINDOW->m_uSurface.xwayland->height)); + g_pXWaylandManager->setWindowSize(PWINDOW, PWINDOW->m_vRealSize.vec()); g_pCompositor->moveWindowToTop(PWINDOW); PWINDOW->updateWindowDecos(); |