Rémi Bernon (@rbernon) commented about dlls/winex11.drv/xim.c:
+ if (!data->xic) + { + release_win_data( data ); + continue; + } + + pt = *point; + + if (hwnd != data->hwnd) + NtUserMapWindowPoints( hwnd, data->hwnd, &pt, 1, 0 /* per-monitor DPI */ ); + + if (NtUserGetWindowLongW( data->hwnd, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) + pt.x = data->client_rect.right - data->client_rect.left - 1 - pt.x; + + xpoint.x = pt.x + data->client_rect.left - data->whole_rect.left; + xpoint.y = pt.y + data->client_rect.top - data->whole_rect.top; XIC are only created on top-level windows, it would be better lookup the top-level window and do that point mapping in win32u.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/6286#note_79086