mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-05-13 07:10:35 +01:00
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
This commit is contained in:
parent
708a7c24ef
commit
948277895e
1 changed files with 8 additions and 0 deletions
|
@ -129,6 +129,10 @@ void CPopup::onUnmap() {
|
||||||
|
|
||||||
m_mapped = false;
|
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;
|
m_lastSize = m_resource->m_surface->m_surface->m_current.size;
|
||||||
|
|
||||||
const auto COORDS = coordsGlobal();
|
const auto COORDS = coordsGlobal();
|
||||||
|
@ -137,6 +141,10 @@ void CPopup::onUnmap() {
|
||||||
box.translate(COORDS).expand(4);
|
box.translate(COORDS).expand(4);
|
||||||
g_pHyprRenderer->damageBox(box);
|
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();
|
m_subsurfaceHead.reset();
|
||||||
|
|
||||||
if (!m_layerOwner.expired() && m_layerOwner->m_layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP)
|
if (!m_layerOwner.expired() && m_layerOwner->m_layer < ZWLR_LAYER_SHELL_V1_LAYER_TOP)
|
||||||
|
|
Loading…
Reference in a new issue