Skip to content

Commit

Permalink
textinput: don't reset if ti isn't enabled (hyprwm#7798)
Browse files Browse the repository at this point in the history
  • Loading branch information
sungyoonc authored and fufexan committed Sep 18, 2024
1 parent f5d99c9 commit a611773
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/managers/input/TextInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,13 @@ void CTextInput::onReset() {
if (g_pInputManager->m_sIMERelay.m_pIME.expired())
return;

if (!focusedSurface())
return;

const auto PFOCUSEDTI = g_pInputManager->m_sIMERelay.getFocusedTextInput();
if (!PFOCUSEDTI || PFOCUSEDTI != this)
return;

g_pInputManager->m_sIMERelay.deactivateIME(this, false);
g_pInputManager->m_sIMERelay.activateIME(this);
}
Expand Down

0 comments on commit a611773

Please sign in to comment.