IME: fix IME popup mouse inputs (again) (#5417)

`lastBoxLocal`'s size should be the actual popup's size instead of the cursor
rectangle's size. Also, the rectangle position is now relative to the popup.
(Actually fixes #5255 imho.)

One thing #3922 missed was handling focus held by buttons. Let's hope I get
it right this time.
This commit is contained in:
Junxuan Liao 2024-04-07 22:15:50 +08:00 committed by GitHub
parent f2a848cbcc
commit d657b59f70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 54 additions and 42 deletions

View file

@ -221,3 +221,12 @@ CInputPopup* CInputMethodRelay::popupFromCoords(const Vector2D& point) {
return nullptr;
}
CInputPopup* CInputMethodRelay::popupFromSurface(const wlr_surface* surface) {
for (auto& p : m_vIMEPopups) {
if (p->getWlrSurface() == surface)
return p.get();
}
return nullptr;
}