Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIN32: Better support for IME #4

Merged
merged 1 commit into from
Jul 2, 2024
Merged

Conversation

xfangfang
Copy link

In Windows, glfwSetPreeditCursorRectangle occasionally fails:

  1. Win11 default Chinese PinYin input method, sometimes displayed in the correct position, sometimes appearing in the bottom right corner of the screen
  2. Some third-party input methods always display at incorrect positions (such as Sogou input method)

By comparing the implementation of SDL2, it is found that calling ImmSetCompositionWindow before ImmSetCandidateWindow can solve this problem.

https://github.com/libsdl-org/SDL/blob/f7877902436eae72e3931b2d9ab9d213e095baab/src/video/windows/SDL_windowskeyboard.c#L642-L686

@ashie ashie merged commit 0c57adf into clear-code:im-support Jul 2, 2024
3 checks passed
@ashie
Copy link
Member

ashie commented Jul 2, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants