From b7b13623bac54d4f6dd9e546f18fa816ecf555b7 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 14 Mar 2024 20:21:58 +0000 Subject: [PATCH] subsurface/popup: expand on map/unmap to add buffering ref #5113 --- src/desktop/Popup.cpp | 4 ++-- src/desktop/Subsurface.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp index 29594e47..d5599c65 100644 --- a/src/desktop/Popup.cpp +++ b/src/desktop/Popup.cpp @@ -106,7 +106,7 @@ void CPopup::onMap() { CBox box; wlr_surface_get_extends(m_sWLSurface.wlr(), box.pWlr()); - box.applyFromWlr().translate(COORDS); + box.applyFromWlr().translate(COORDS).expand(4); g_pHyprRenderer->damageBox(&box); m_vLastPos = coordsRelativeToParent(); @@ -125,7 +125,7 @@ void CPopup::onUnmap() { CBox box; wlr_surface_get_extends(m_sWLSurface.wlr(), box.pWlr()); - box.applyFromWlr().translate(COORDS); + box.applyFromWlr().translate(COORDS).expand(4); g_pHyprRenderer->damageBox(&box); m_pSubsurfaceHead.reset(); diff --git a/src/desktop/Subsurface.cpp b/src/desktop/Subsurface.cpp index 0d76a147..1a3dd9f5 100644 --- a/src/desktop/Subsurface.cpp +++ b/src/desktop/Subsurface.cpp @@ -177,6 +177,7 @@ void CSubsurface::onMap() { const auto COORDS = coordsGlobal(); CBox box{COORDS, m_vLastSize}; + box.expand(4); g_pHyprRenderer->damageBox(&box); if (m_pWindowParent) @@ -186,6 +187,7 @@ void CSubsurface::onMap() { void CSubsurface::onUnmap() { const auto COORDS = coordsGlobal(); CBox box{COORDS, m_vLastSize}; + box.expand(4); g_pHyprRenderer->damageBox(&box); if (m_sWLSurface.wlr() == g_pCompositor->m_pLastFocus)