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 bf6d605..76fa689 100644
--- a/x.c
+++ b/x.c
@@ -99,7 +99,7 @@ typedef struct {
                XIM xim;
                XIC xic;
                XPoint spot;
-               XVaNestedList spotlist;
+               XVaNestedList preedit;
        } ime;
        Draw draw;
        Visual *vis;
@@ -1044,8 +1044,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,
@@ -1075,7 +1074,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
@@ -1637,7 +1636,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


Reply via email to