mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-23 00:49:48 +01:00
IME Popup damage fixes
This commit is contained in:
parent
9bfa3ebc50
commit
23c5760538
2 changed files with 8 additions and 0 deletions
|
@ -306,6 +306,7 @@ struct SIMEPopup {
|
||||||
int x, y;
|
int x, y;
|
||||||
int realX, realY;
|
int realX, realY;
|
||||||
bool visible;
|
bool visible;
|
||||||
|
Vector2D lastSize;
|
||||||
|
|
||||||
DYNLISTENER(mapPopup);
|
DYNLISTENER(mapPopup);
|
||||||
DYNLISTENER(unmapPopup);
|
DYNLISTENER(unmapPopup);
|
||||||
|
|
|
@ -125,6 +125,9 @@ void CInputMethodRelay::updateInputPopup(SIMEPopup* pPopup) {
|
||||||
if (!pPopup->pSurface->mapped)
|
if (!pPopup->pSurface->mapped)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// damage last known pos & size
|
||||||
|
g_pHyprRenderer->damageBox(pPopup->realX, pPopup->realY, pPopup->lastSize.x, pPopup->lastSize.y);
|
||||||
|
|
||||||
const auto PFOCUSEDTI = getFocusedTextInput();
|
const auto PFOCUSEDTI = getFocusedTextInput();
|
||||||
|
|
||||||
if (!PFOCUSEDTI || !PFOCUSEDTI->pWlrInput->focused_surface)
|
if (!PFOCUSEDTI || !PFOCUSEDTI->pWlrInput->focused_surface)
|
||||||
|
@ -167,6 +170,8 @@ void CInputMethodRelay::updateInputPopup(SIMEPopup* pPopup) {
|
||||||
pPopup->realX = finalBox.x + parentPos.x;
|
pPopup->realX = finalBox.x + parentPos.x;
|
||||||
pPopup->realY = finalBox.y + parentPos.y + finalBox.height;
|
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);
|
wlr_input_popup_surface_v2_send_text_input_rectangle(pPopup->pSurface, &finalBox);
|
||||||
|
|
||||||
damagePopup(pPopup);
|
damagePopup(pPopup);
|
||||||
|
@ -189,6 +194,8 @@ void Events::listener_unmapInputPopup(void* owner, void* data) {
|
||||||
|
|
||||||
Debug::log(LOG, "Unmapped an IME Popup");
|
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);
|
g_pInputManager->m_sIMERelay.updateInputPopup(PPOPUP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue