fix the strange behavior of Korean ime composition window.

Because Hangul is a combination character, WM_IME_STARTCOMPOSITION is only called once when the IME input is started, so the position of the composition window is strange.

Therefore, I solved the problem by controlling the state of characters combined using WM_IME_COMPOSITION and WM_IME_CHAR.

We have also improved to support other IME languages such as Chinese and Japanese.
This commit is contained in:
이지한
2019-08-01 15:24:46 +09:00
parent de9043e223
commit 129b83e68f
13 changed files with 152 additions and 12 deletions

View File

@@ -96,6 +96,11 @@ namespace nana
overridden_ &= ~(1 << static_cast<int>(event_code::focus));
}
void drawer_trigger::key_ime(graph_reference, const arg_ime&)
{
overridden_ &= ~(1 << static_cast<int>(event_code::key_ime));
}
void drawer_trigger::key_press(graph_reference, const arg_keyboard&)
{
overridden_ &= ~(1 << static_cast<int>(event_code::key_press));
@@ -318,6 +323,11 @@ namespace nana
_m_emit(event_code::focus, arg, &drawer_trigger::focus, bForce__EmitInternal);
}
void drawer::key_ime(const arg_ime& arg, const bool bForce__EmitInternal)
{
_m_emit(event_code::key_ime, arg, &drawer_trigger::key_ime, bForce__EmitInternal);
}
void drawer::key_press(const arg_keyboard& arg, const bool bForce__EmitInternal)
{
_m_emit(event_code::key_press, arg, &drawer_trigger::key_press, bForce__EmitInternal);