macOS: Clean up any text that may not have been sent when loses focus

This commit is contained in:
pagedown 2022-01-27 12:37:17 +08:00
parent f646dfa238
commit b9a612fb9c
No known key found for this signature in database
GPG Key ID: E921CF18AC8FF6EB

View File

@ -713,6 +713,7 @@ - (void)windowDidResignKey:(NSNotification *)notification
[window->ns.view unmarkText];
GLFWkeyevent dummy = {.action = GLFW_RELEASE, .ime_state = GLFW_IME_PREEDIT_CHANGED};
_glfwInputKeyboard(window, &dummy);
_glfw.ns.text[0] = 0;
}
}