xim: a spot is a baseline; a popup flipped above it clears the line

An XIM spot has no height, so a popup that flips above it at the bottom
of the screen ended on the baseline and covered the line being typed.
The spot now stands for the row above it, one popup row tall, as GTK
and IBus carets carry their line height; below the spot nothing moves.
This commit is contained in:
2026-08-17 01:59:29 +09:00
parent dd389edc4f
commit b979afc3f7
3 changed files with 23 additions and 16 deletions

7
xim.c
View File

@@ -196,8 +196,13 @@ place(Ic *state)
XCB_XIM_XNSpotLocation_MASK){
attr = xcb_im_input_context_get_preedit_attr(state->xic);
if(translate(focuswin, attr->spot_location.x,
attr->spot_location.y, &state->caret))
attr->spot_location.y, &state->caret)){
/* A spot is a baseline: call the line one row above it,
* so that a popup flipped above it clears the text. */
state->caret.y -= Fontsz;
state->caret.h = Fontsz;
return;
}
}
if(placebottom(state, focuswin))
return;