if (FRAME_XIC (f))
{
- spot.x = WINDOW_TO_FRAME_PIXEL_X (w, x) + WINDOW_LEFT_FRINGE_WIDTH (w) + WINDOW_LEFT_MARGIN_WIDTH(w);
- spot.y = WINDOW_TO_FRAME_PIXEL_Y (w, y) + FONT_BASE (FRAME_FONT (f));
+ spot.x = (WINDOW_TO_FRAME_PIXEL_X (w, x)
+ + WINDOW_LEFT_FRINGE_WIDTH (w)
+ + WINDOW_LEFT_MARGIN_WIDTH (w));
+ spot.y = (WINDOW_TO_FRAME_PIXEL_Y (w, y)
+ + w->phys_cursor_height);
if (FRAME_XIC_STYLE (f) & XIMPreeditCallbacks)
attr = XVaCreateNestedList (0, XNSpotLocation, &spot,