mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
Update IME status when window lost focus
This commit is contained in:
parent
6a8aeb2501
commit
088b7cde4f
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue