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

@@ -789,6 +789,8 @@ void Events::listener_commitWindow(void* owner, void* data) {
if (!PWINDOW->m_bMappedX11 || PWINDOW->isHidden() || (PWINDOW->m_bIsX11 && !PWINDOW->m_bMappedX11))
return;
PWINDOW->m_vReportedSize = PWINDOW->m_vPendingReportedSize; // apply pending size. We pinged, the window ponged.
PWINDOW->updateSurfaceOutputs();
g_pHyprRenderer->damageSurface(PWINDOW->m_pWLSurface.wlr(), PWINDOW->m_vRealPosition.goalv().x, PWINDOW->m_vRealPosition.goalv().y,