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

View File

@@ -713,6 +713,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
[window->ns.view unmarkText];
GLFWkeyevent dummy = {.action = GLFW_RELEASE, .ime_state = GLFW_IME_PREEDIT_CHANGED};
_glfwInputKeyboard(window, &dummy);
_glfw.ns.text[0] = 0;
}
}