Input Context Values contains both preedit and status attributes which both takes in XVaNestedList type. It would be clearer to use preedit explains more of the preedit attributes compared to spotlist which may not only be used for spot. --- x.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/x.c b/x.c index 1f62129..039cdf3 100644 --- a/x.c +++ b/x.c @@ -98,7 +98,7 @@ typedef struct { XIM xim; XIC xic; XPoint spot; - XVaNestedList spotlist; + XVaNestedList preedit; } ime; Draw draw; Visual *vis; @@ -1040,8 +1040,7 @@ ximopen(Display *dpy) fprintf(stderr, "XSetIMValues: " "Could not set XNDestroyCallback.\n"); - xw.ime.spotlist = XVaCreateNestedList(0, XNSpotLocation, &xw.ime.spot, - NULL); + xw.ime.preedit = XVaCreateNestedList(0, XNSpotLocation, &xw.ime.spot, NULL); if (xw.ime.xic == NULL) { xw.ime.xic = XCreateIC(xw.ime.xim, XNInputStyle, @@ -1071,7 +1070,7 @@ ximdestroy(XIM xim, XPointer client, XPointer call) xw.ime.xim = NULL; XRegisterIMInstantiateCallback(xw.dpy, NULL, NULL, NULL, ximinstantiate, NULL); - XFree(xw.ime.spotlist); + XFree(xw.ime.preedit); } int @@ -1633,7 +1632,7 @@ xximspot(int x, int y) xw.ime.spot.x = borderpx + x * win.cw; xw.ime.spot.y = borderpx + (y + 1) * win.ch; - XSetICValues(xw.ime.xic, XNPreeditAttributes, xw.ime.spotlist, NULL); + XSetICValues(xw.ime.xic, XNPreeditAttributes, xw.ime.preedit, NULL); } void -- 2.25.0