mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-25 12:10:03 +01:00
renderer/ime: fix fcitx5 popup artifacts (#12263)
This commit is contained in:
parent
c330d4334f
commit
ee2168c665
1 changed files with 11 additions and 4 deletions
|
|
@ -120,11 +120,18 @@ void CInputPopup::updateBox() {
|
||||||
CBox cursorBoxLocal({-popupOffset.x, -popupOffset.y}, cursorBoxParent.size());
|
CBox cursorBoxLocal({-popupOffset.x, -popupOffset.y}, cursorBoxParent.size());
|
||||||
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;
|
||||||
|
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();
|
damageEntire();
|
||||||
m_lastBoxLocal = popupBoxParent;
|
|
||||||
}
|
|
||||||
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) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue