surface/wayland: conform to small surface requirements

do not stretch small surfaces, instead center them if they fit.
This commit is contained in:
Vaxry
2023-10-20 20:15:41 +01:00
parent bab2f6a664
commit 7f35f33b4c
7 changed files with 74 additions and 12 deletions

View File

@@ -163,8 +163,8 @@ void CHyprXWaylandManager::setWindowSize(CWindow* pWindow, Vector2D size, bool f
if (!force && ((pWindow->m_vReportedSize == size && windowPos == pWindow->m_vReportedPosition) || (pWindow->m_vReportedSize == size && !pWindow->m_bIsX11)))
return;
pWindow->m_vReportedPosition = windowPos;
pWindow->m_vReportedSize = size;
pWindow->m_vReportedPosition = windowPos;
pWindow->m_vPendingReportedSize = size;
pWindow->m_fX11SurfaceScaledBy = 1.f;