renderer/ime: fix fcitx5 popup artifacts (#12263)

This commit is contained in:
bea4dev 2025-11-12 05:43:43 +09:00 committed by GitHub
parent c330d4334f
commit ee2168c665
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -121,10 +121,17 @@ void CInputPopup::updateBox() {
m_popup->sendInputRectangle(cursorBoxLocal); m_popup->sendInputRectangle(cursorBoxLocal);
CBox popupBoxParent(cursorBoxParent.pos() + popupOffset, currentPopupSize); CBox popupBoxParent(cursorBoxParent.pos() + popupOffset, currentPopupSize);
if (popupBoxParent != m_lastBoxLocal) { const bool boxChanged = popupBoxParent != m_lastBoxLocal;
damageEntire(); if (boxChanged)
damageEntire(); // damage the old location before updating
m_lastBoxLocal = popupBoxParent; m_lastBoxLocal = popupBoxParent;
}
// Since a redraw request is not always sent when only the position is updated,
// a manual redraw may be required in some cases.
if (boxChanged)
damageEntire();
damageSurface(); damageSurface();
if (const auto PM = g_pCompositor->getMonitorFromCursor(); PM && PM->m_id != m_lastMonitor) { if (const auto PM = g_pCompositor->getMonitorFromCursor(); PM && PM->m_id != m_lastMonitor) {