ime: account for text height in popup calcs

This commit is contained in:
vaxerski 2023-03-14 16:46:39 +00:00
parent 7e5a3eb045
commit d63e8c8f45

View file

@ -211,7 +211,7 @@ void CInputMethodRelay::updateInputPopup(SIMEPopup* pPopup) {
wlr_box finalBox = cursorBox; wlr_box finalBox = cursorBox;
if (cursorBox.y + parentPos.y + pPopup->pSurface->surface->current.height > pMonitor->vecPosition.y + pMonitor->vecSize.y) if (cursorBox.y + parentPos.y + pPopup->pSurface->surface->current.height + finalBox.height > pMonitor->vecPosition.y + pMonitor->vecSize.y)
finalBox.y -= pPopup->pSurface->surface->current.height + finalBox.height; finalBox.y -= pPopup->pSurface->surface->current.height + finalBox.height;
if (cursorBox.x + parentPos.x + pPopup->pSurface->surface->current.width > pMonitor->vecPosition.x + pMonitor->vecSize.x) if (cursorBox.x + parentPos.x + pPopup->pSurface->surface->current.width > pMonitor->vecPosition.x + pMonitor->vecSize.x)