您当前的位置: 首页 >  linux

柳鲲鹏

暂无认证

  • 0浏览

    0关注

    4642博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

关于LINUX输入法候选框光标跟随的代码的一个网页

柳鲲鹏 发布时间:2021-03-31 13:34:55 ,浏览量:0

  吾搜索后,发现真有牛人提供解决办法:

https://stackoverflow.com/questions/66290102/how-to-get-cursor-position-of-mcclim

  有用内容如下:

Basically this is done by XIM_SET_IC_VALUES in the protocol. The values the spot location within a nested value of preedit attributes.

The spot is simply a X point (x, y). Despite of that, the point is a relative coordinates to the focus window. The focus window is also a part of ic vlaues, with property name XNFocusWindow.

If you don't set focus window, the client window that passed through XCreateIC will be used as the focus window.

    XVaNestedList preedit_attr;
    preedit_attr = XVaCreateNestedList(0, XNSpotLocation, &nspot, NULL);
    XSetICValues(ic, XNPreeditAttributes, preedit_attr, NULL);
    XFree(preedit_attr);

  根据参数类型,找一下已有代码的对应内容,就可以实现了。

关注
打赏
1665724893
查看更多评论
立即登录/注册

微信扫码登录

0.0701s