summaryrefslogtreecommitdiff
path: root/src/managers/input/InputMethodRelay.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-23 11:16:27 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-08-23 11:16:35 +0200
commit23c5760538c8db68c0b0d3b170c6e812f50a1bb4 (patch)
tree6147f1712ecc8a8a426c455e97edbd373010a525 /src/managers/input/InputMethodRelay.cpp
parent9bfa3ebc50f503f3eaa43dcad44a976e8ee14c73 (diff)
IME Popup damage fixes
Diffstat (limited to 'src/managers/input/InputMethodRelay.cpp')
-rw-r--r--src/managers/input/InputMethodRelay.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/managers/input/InputMethodRelay.cpp b/src/managers/input/InputMethodRelay.cpp
index 4f18781a..e697c44f 100644
--- a/src/managers/input/InputMethodRelay.cpp
+++ b/src/managers/input/InputMethodRelay.cpp
@@ -125,6 +125,9 @@ void CInputMethodRelay::updateInputPopup(SIMEPopup* pPopup) {
if (!pPopup->pSurface->mapped)
return;
+ // damage last known pos & size
+ g_pHyprRenderer->damageBox(pPopup->realX, pPopup->realY, pPopup->lastSize.x, pPopup->lastSize.y);
+
const auto PFOCUSEDTI = getFocusedTextInput();
if (!PFOCUSEDTI || !PFOCUSEDTI->pWlrInput->focused_surface)
@@ -167,6 +170,8 @@ void CInputMethodRelay::updateInputPopup(SIMEPopup* pPopup) {
pPopup->realX = finalBox.x + parentPos.x;
pPopup->realY = finalBox.y + parentPos.y + finalBox.height;
+ pPopup->lastSize = Vector2D(pPopup->pSurface->surface->current.width, pPopup->pSurface->surface->current.height);
+
wlr_input_popup_surface_v2_send_text_input_rectangle(pPopup->pSurface, &finalBox);
damagePopup(pPopup);
@@ -189,6 +194,8 @@ void Events::listener_unmapInputPopup(void* owner, void* data) {
Debug::log(LOG, "Unmapped an IME Popup");
+ g_pHyprRenderer->damageBox(PPOPUP->realX, PPOPUP->realY, PPOPUP->lastSize.x, PPOPUP->lastSize.y);
+
g_pInputManager->m_sIMERelay.updateInputPopup(PPOPUP);
}