win32: fix ime setcontext lparam

Fixes #3893.
This commit is contained in:
Kotomine Shiki authored and Kirill Chibisov committed 2026-03-02 22:49:04 +09:00
1 parent bccc568345
commit 17a73f4dd4
2 files changed
+4 -3

No files matched your search

+1
View File
@@ -46,3 +46,4 @@ changelog entry.
- On X11, fix `set_hittest` not working on some window managers.
- On X11, fix debug mode overflow panic in `set_timestamp`.
- On macOS, fix crash in `set_marked_text` when native Pinyin IME sends out-of-bounds `selected_range`.
- On Windows, fix `WM_IME_SETCONTEXT` IME UI flag masking on `lParam`.
+3 -3
View File
@@ -1612,9 +1612,9 @@ unsafe fn public_window_callback_inner(
},
WM_IME_SETCONTEXT => {
// Hide composing text drawn by IME.
let wparam = wparam & (!ISC_SHOWUICOMPOSITIONWINDOW as usize);
result = ProcResult::DefWindowProc(wparam);
// IME UI visibility flags are in lparam.
let lparam = lparam & !(ISC_SHOWUICOMPOSITIONWINDOW as isize);
result = ProcResult::Value(unsafe { DefWindowProcW(window, msg, wparam, lparam) });
},
// this is necessary for us to maintain minimize/restore state