window: update window reported size on damage events

This commit is contained in:
Vaxry 2023-10-30 14:49:49 +00:00
parent 8e91c038db
commit cb6cfde6e8

View file

@ -247,6 +247,9 @@ void Events::listener_commitSubsurface(void* owner, void* data) {
g_pHyprRenderer->damageSurface(pNode->pSurface->wlr(), lx, ly, SCALE); g_pHyprRenderer->damageSurface(pNode->pSurface->wlr(), lx, ly, SCALE);
if (pNode->pWindowOwner) { if (pNode->pWindowOwner) {
// update reported size. Some windows do not send a ::commit afterwards. Odd.
pNode->pWindowOwner->m_vReportedSize = pNode->pWindowOwner->m_vPendingReportedSize;
// tearing: if solitary, redraw it. This still might be a single surface window // tearing: if solitary, redraw it. This still might be a single surface window
const auto PMONITOR = g_pCompositor->getMonitorFromID(pNode->pWindowOwner->m_iMonitorID); const auto PMONITOR = g_pCompositor->getMonitorFromID(pNode->pWindowOwner->m_iMonitorID);
if (PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->tearingState.canTear && if (PMONITOR->solitaryClient == pNode->pWindowOwner && pNode->pWindowOwner->canBeTorn() && PMONITOR->tearingState.canTear &&