Use phys cursor height instead of font base to set spot Y

* src/xfns.c (xic_set_xfontset): Use `phys_cursor_height' to
avoid the spot potentially appearing at an incorrect position.
This commit is contained in:
Po Lu 2022-01-10 14:38:18 +08:00
parent f591835838
commit 16ed07ac8d

View file

@ -2822,8 +2822,11 @@ xic_set_preeditarea (struct window *w, int x, int y)
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,