Cancel IME for active kitty or OS window only

This commit is contained in:
pagedown
2022-01-27 11:48:48 +08:00
parent 0b2a533b44
commit f646dfa238
2 changed files with 10 additions and 8 deletions

View File

@@ -81,6 +81,7 @@ active_window(void) {
void
update_ime_focus(OSWindow *osw, bool focused) {
if (!osw || !osw->handle) return;
GLFWIMEUpdateEvent ev = { .focused = focused, .type = GLFW_IME_UPDATE_FOCUS };
glfwUpdateIMEState(osw->handle, &ev);
}