aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/managers/input/TextInput.cpp
diff options
context:
space:
mode:
authorSungyoon Cho <[email protected]>2024-03-24 06:12:27 +0900
committerGitHub <[email protected]>2024-03-23 21:12:27 +0000
commit2d5fda4810f706a1b6e2c0a1021ce57c8ad2e7a9 (patch)
treeb7ae0458fa1d97b06267a3a55ea381ffbd4f24ea /src/managers/input/TextInput.cpp
parent0d91f82d835b65f339726e3fbbd9c5347baabf7e (diff)
downloadHyprland-2d5fda4810f706a1b6e2c0a1021ce57c8ad2e7a9.tar.gz
Hyprland-2d5fda4810f706a1b6e2c0a1021ce57c8ad2e7a9.zip
input: fix crash with text-input-v1 (#5234)
Diffstat (limited to 'src/managers/input/TextInput.cpp')
-rw-r--r--src/managers/input/TextInput.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/managers/input/TextInput.cpp b/src/managers/input/TextInput.cpp
index a1916929..827d4dbe 100644
--- a/src/managers/input/TextInput.cpp
+++ b/src/managers/input/TextInput.cpp
@@ -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);