From 8f81699868d3a8ef423eba39e83c4862ca9ad050 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 31 Dec 2021 08:46:54 -0800 Subject: [PATCH] Only clear IME display options if SDL_HINT_IME_SHOW_UI is off (thanks opxdo!) Fixes https://github.com/libsdl-org/SDL/issues/5153 --- src/video/windows/SDL_windowskeyboard.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/video/windows/SDL_windowskeyboard.c b/src/video/windows/SDL_windowskeyboard.c index 6cbf4953f..d653d896d 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;