diff options
| author | bea4dev <34712108+bea4dev@users.noreply.github.com> | 2025-11-12 05:43:43 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-11 20:43:43 +0000 |
| commit | ee2168c665c9c01991cd2a0e73633e4e7d833259 (patch) | |
| tree | 3ac43371105d7a42672a83c04439833a6fdae179 /src/managers/input/InputMethodPopup.cpp | |
| parent | c330d4334f0f14ea46fdcafc164faeec09ea82e9 (diff) | |
renderer/ime: fix fcitx5 popup artifacts (#12263)
Diffstat (limited to 'src/managers/input/InputMethodPopup.cpp')
| -rw-r--r-- | src/managers/input/InputMethodPopup.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/managers/input/InputMethodPopup.cpp b/src/managers/input/InputMethodPopup.cpp index 27acd08c..3c4731b5 100644 --- a/src/managers/input/InputMethodPopup.cpp +++ b/src/managers/input/InputMethodPopup.cpp @@ -120,11 +120,18 @@ void CInputPopup::updateBox() { CBox cursorBoxLocal({-popupOffset.x, -popupOffset.y}, cursorBoxParent.size()); m_popup->sendInputRectangle(cursorBoxLocal); - CBox popupBoxParent(cursorBoxParent.pos() + popupOffset, currentPopupSize); - if (popupBoxParent != m_lastBoxLocal) { + CBox popupBoxParent(cursorBoxParent.pos() + popupOffset, currentPopupSize); + const bool boxChanged = popupBoxParent != m_lastBoxLocal; + if (boxChanged) + damageEntire(); // damage the old location before updating + + 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(); - m_lastBoxLocal = popupBoxParent; - } + damageSurface(); if (const auto PM = g_pCompositor->getMonitorFromCursor(); PM && PM->m_id != m_lastMonitor) { |
