diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-02-01 00:55:17 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-02-01 00:55:29 +0000 |
| commit | cfd68af5b6c26f244838b628cf375b9cc0c5cfdf (patch) | |
| tree | 7a8f1d5b3446af2a8321db52ee854e7ff4c0ba07 /src/Window.cpp | |
| parent | 4f804d5f962070c531dea5025e61be8a0da8129e (diff) | |
tearing-control: handle unmapped surfaces for hints
fixes #4570
Diffstat (limited to 'src/Window.cpp')
| -rw-r--r-- | src/Window.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index ceda1284..d821b1b9 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -518,6 +518,14 @@ void CWindow::onMap() { "CWindow"); m_vReportedSize = m_vPendingReportedSize; + + for (const auto& ctrl : g_pHyprRenderer->m_vTearingControllers) { + if (ctrl->pWlrHint->surface != m_pWLSurface.wlr()) + continue; + + m_bTearingHint = ctrl->pWlrHint->current; + break; + } } void CWindow::onBorderAngleAnimEnd(void* ptr) { |
