diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2025-05-06 21:49:20 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-06 21:49:20 +0200 |
| commit | 948277895efba5e8bcc66d34dcafe87518fc7b61 (patch) | |
| tree | 496b212bf74cf8196df78647656c89deffc01929 /src | |
| parent | 708a7c24ef2c137c04c2473ee6b3f841ed5a1d8b (diff) | |
popup: damage old size on unmap as well as new (#10306)
fixes #10305
chromium for some reason sets the popup size to like 8x8 at the same time as unmapping
Diffstat (limited to 'src')
| -rw-r--r-- | src/desktop/Popup.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp index f35cedcb..ed882c3a 100644 --- a/src/desktop/Popup.cpp +++ b/src/desktop/Popup.cpp @@ -129,6 +129,10 @@ void CPopup::onUnmap() { m_mapped = false; + // if the popup committed a different size right now, we also need to damage the old size. + const Vector2D MAX_DAMAGE_SIZE = {std::max(m_lastSize.x, m_resource->m_surface->m_surface->m_current.size.x), + std::max(m_lastSize.y, m_resource->m_surface->m_surface->m_current.size.y)}; + m_lastSize = m_resource->m_surface->m_surface->m_current.size; const auto COORDS = coordsGlobal(); @@ -137,6 +141,10 @@ void CPopup::onUnmap() { box.translate(COORDS).expand(4); g_pHyprRenderer->damageBox(box); + // damage the last popup's explicit max size as well + box = CBox{COORDS, MAX_DAMAGE_SIZE}.expand(4); + g_pHyprRenderer->damageBox(box); + m_subsurfaceHead.reset(); if (!m_layerOwner.expired() && m_layerOwner->m_layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP) |
