win32: fix ime setcontext lparam

Fixes #3893.
This commit is contained in:
Kotomine Shiki
2026-03-01 21:08:45 +08:00
committed by GitHub
parent 85ff2fa093
commit c535968128
2 changed files with 4 additions and 3 deletions

View File

@@ -1503,9 +1503,9 @@ unsafe fn public_window_callback_inner(
}, },
WM_IME_SETCONTEXT => { WM_IME_SETCONTEXT => {
// Hide composing text drawn by IME. // IME UI visibility flags are in lparam.
let wparam = wparam & (!ISC_SHOWUICOMPOSITIONWINDOW as usize); let lparam = lparam & !(ISC_SHOWUICOMPOSITIONWINDOW as isize);
result = ProcResult::DefWindowProc(wparam); result = ProcResult::Value(unsafe { DefWindowProcW(window, msg, wparam, lparam) });
}, },
// this is necessary for us to maintain minimize/restore state // this is necessary for us to maintain minimize/restore state

View File

@@ -55,5 +55,6 @@ changelog entry.
- On Redox, handle `EINTR` when reading from `event_socket` instead of panicking. - On Redox, handle `EINTR` when reading from `event_socket` instead of panicking.
- On Wayland, switch from using the `ahash` hashing algorithm to `foldhash`. - On Wayland, switch from using the `ahash` hashing algorithm to `foldhash`.
- On macOS, fix borderless game presentation options not sticking after switching spaces. - On macOS, fix borderless game presentation options not sticking after switching spaces.
- On Windows, fix `WM_IME_SETCONTEXT` IME UI flag masking on `lParam`.
- On macOS, fix crash in `set_marked_text` when native Pinyin IME sends out-of-bounds `selected_range`. - On macOS, fix crash in `set_marked_text` when native Pinyin IME sends out-of-bounds `selected_range`.
- On X11, fix debug mode overflow panic in `set_timestamp`. - On X11, fix debug mode overflow panic in `set_timestamp`.