Commit 8f81699868d3a8ef423eba39e83c4862ca9ad050

Sam Lantinga 2021-12-31T08:46:54

Only clear IME display options if SDL_HINT_IME_SHOW_UI is off (thanks opxdo!) Fixes https://github.com/libsdl-org/SDL/issues/5153

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c
index 6cbf495..d653d89 100644
--- a/src/video/windows/SDL_windowskeyboard.c
+++ b/src/video/windows/SDL_windowskeyboard.c
@@ -910,7 +910,9 @@ IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SDL_VideoD
         IME_InputLangChanged(videodata);
         break;
     case WM_IME_SETCONTEXT:
-        *lParam = 0;
+        if (videodata->ime_uiless) {
+            *lParam = 0;
+        }
         break;
     case WM_IME_STARTCOMPOSITION:
         trap = SDL_TRUE;