macOS: Explicitly cancel IME composition when losing the focus
This commit is contained in:
parent
d1531632a2
commit
a3aaaa1efb
1 changed files with 1 additions and 0 deletions
|
|
@ -709,6 +709,7 @@ - (void)windowDidResignKey:(NSNotification *)notification
|
|||
_glfwInputWindowFocus(window, false);
|
||||
// IME is cancelled when losing the focus
|
||||
if ([window->ns.view hasMarkedText]) {
|
||||
[[window->ns.view inputContext] discardMarkedText];
|
||||
[window->ns.view unmarkText];
|
||||
GLFWkeyevent dummy = {.action = GLFW_RELEASE, .ime_state = GLFW_IME_PREEDIT_CHANGED};
|
||||
_glfwInputKeyboard(window, &dummy);
|
||||
|
|
|
|||
Loading…
Reference in a new issue