popup: avoid damage loops with commits

fixes #5118
This commit is contained in:
Vaxry 2024-03-15 15:55:24 +00:00
parent bc15a8f600
commit bb933dcf04
2 changed files with 5 additions and 4 deletions

View file

@ -133,7 +133,7 @@ void CPopup::onUnmap() {
g_pInputManager->simulateMouseMovement();
}
void CPopup::onCommit() {
void CPopup::onCommit(bool ignoreSiblings) {
if (m_pWLR->base->initial_commit) {
wlr_xdg_surface_schedule_configure(m_pWLR->base);
return;
@ -152,6 +152,7 @@ void CPopup::onCommit() {
m_vLastPos = COORDSLOCAL;
}
if (!ignoreSiblings)
m_pSubsurfaceHead->recheckDamageForSubsurfaces();
g_pHyprRenderer->damageSurface(m_sWLSurface.wlr(), COORDS.x, COORDS.y);
@ -227,7 +228,7 @@ void CPopup::recheckTree() {
void CPopup::recheckChildrenRecursive() {
for (auto& c : m_vChildren) {
c->onCommit();
c->onCommit(true);
c->recheckChildrenRecursive();
}
}

View file

@ -26,7 +26,7 @@ class CPopup {
void onDestroy();
void onMap();
void onUnmap();
void onCommit();
void onCommit(bool ignoreSiblings = false);
void onReposition();
void recheckTree();