input: fix crash with text-input-v1 (#5234)

This commit is contained in:
Sungyoon Cho 2024-03-24 06:12:27 +09:00 committed by GitHub
parent 0d91f82d83
commit 2d5fda4810
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,9 +71,10 @@ void CTextInput::onEnabled(wlr_surface* surfV1) {
// v1 only, map surface to PTI
if (!isV3()) {
wlr_surface* pSurface = surfV1;
setFocusedSurface(pSurface);
if (g_pCompositor->m_pLastFocus == pSurface)
enter(pSurface);
else
setFocusedSurface(pSurface);
}
wlr_input_method_v2_send_activate(g_pInputManager->m_sIMERelay.m_pWLRIME);