Fix input method cursor follow issue under X11

This commit is contained in:
Cjacker 2017-10-25 15:03:21 +08:00
parent b25949c9b3
commit 7c7b0333d4

View File

@ -835,6 +835,19 @@ namespace detail
i->second->reinstate(); i->second->reinstate();
i->second->pos = pos; i->second->pos = pos;
} }
auto addr = i->second;
XPoint spot;
XVaNestedList list;
if(addr->input_context) {
spot.x = pos.x;
spot.y = pos.y + addr->size.height;
list = ::XVaCreateNestedList(0, XNSpotLocation, &spot,
XNForeground, 0,
XNBackground, 0,
(void *)0);
::XSetICValues(addr->input_context, XNPreeditAttributes, list, NULL);
::XFree(list);
}
} }
void platform_spec::caret_visible(native_window_type wd, bool vis) void platform_spec::caret_visible(native_window_type wd, bool vis)