Rémi Bernon (@rbernon) commented about dlls/imm32/imm.c:
ImmNotifyIME( himc, NI_CONTEXTUPDATED, 0, IMC_SETCOMPOSITIONWINDOW ); SendMessageW( ctx->hWnd, WM_IME_NOTIFY, IMN_SETCOMPOSITIONWINDOW, 0 );
- if (composition->dwStyle & (CFS_RECT | CFS_POINT | CFS_FORCE_POSITION))
- {
if (composition->dwStyle & CFS_RECT)
{
point.x = composition->rcArea.left;
point.y = composition->rcArea.top;
}
else
{
point = composition->ptCurrentPos;
}
NtUserLogicalToPerMonitorDPIPhysicalPoint( ctx->hWnd, &point );
I think there's some DPI inconsistencies for the point parameter. Here you map it to window monitor DPI coordinates, while I believe SetCaretPos and ShowCaret coordinates are in caret window logical coordinates. It would be better to always pass the point in hwnd logical coordinates and map DPI in win32u before calling into the drivers.