Update IME status when window lost focus
This commit is contained in:
parent
6a8aeb2501
commit
088b7cde4f
@ -864,6 +864,12 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
|
||||
showCursor(window);
|
||||
|
||||
_glfwInputWindowFocus(window, false);
|
||||
// IME is cancelled when losing the focus
|
||||
if ([window->ns.view hasMarkedText]) {
|
||||
[window->ns.view unmarkText];
|
||||
GLFWkeyevent dummy = {.action = GLFW_RELEASE, .ime_state = GLFW_IME_PREEDIT_CHANGED};
|
||||
_glfwInputKeyboard(window, &dummy);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)windowDidChangeScreen:(NSNotification *)notification
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user