mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-27 02:46:08 +08:00
win32: Fix composition UI being displayed when IME is disabled
This commit is contained in:
committed by
Sam Lantinga
parent
ad60fa07d7
commit
8535936401
@@ -1072,6 +1072,14 @@ bool WIN_HandleIMEMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SD
|
|||||||
*lParam &= element_mask;
|
*lParam &= element_mask;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
} else if (msg == WM_IME_STARTCOMPOSITION) {
|
||||||
|
SDL_DebugIMELog("WM_IME_STARTCOMPOSITION");
|
||||||
|
if (videodata->ime_internal_composition) {
|
||||||
|
// Windows may still display a composition dialog even with
|
||||||
|
// ISC_SHOWUICOMPOSITIONWINDOW cleared, so trap the message
|
||||||
|
// here to prevent that (even when the IME is disabled).
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!videodata->ime_initialized || !videodata->ime_available || !videodata->ime_enabled) {
|
if (!videodata->ime_initialized || !videodata->ime_available || !videodata->ime_enabled) {
|
||||||
@@ -1099,12 +1107,6 @@ bool WIN_HandleIMEMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, SD
|
|||||||
SDL_DebugIMELog("WM_INPUTLANGCHANGE");
|
SDL_DebugIMELog("WM_INPUTLANGCHANGE");
|
||||||
IME_InputLangChanged(videodata);
|
IME_InputLangChanged(videodata);
|
||||||
break;
|
break;
|
||||||
case WM_IME_STARTCOMPOSITION:
|
|
||||||
SDL_DebugIMELog("WM_IME_STARTCOMPOSITION");
|
|
||||||
if (videodata->ime_internal_composition) {
|
|
||||||
trap = true;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case WM_IME_COMPOSITION:
|
case WM_IME_COMPOSITION:
|
||||||
SDL_DebugIMELog("WM_IME_COMPOSITION %x", lParam);
|
SDL_DebugIMELog("WM_IME_COMPOSITION %x", lParam);
|
||||||
if (videodata->ime_internal_composition) {
|
if (videodata->ime_internal_composition) {
|
||||||
|
|||||||
Reference in New Issue
Block a user