XNextEvent() does not receive the oldest key event with async IMForwardEvent() and sleep()
Submitted by Takao Fujiwara
Assigned to Xorg Project Team
I'm using libX11 1.6.1 and ibus 1.5.6 on Fedora 20. ibus runs with ibus XIM server which uses async IMForwardEvent().
% ibus-daemon --xim
If a client application calls sleep(1) between XNextEvent(), XNextEvent() does not return the oldest KeyPress and KeyRelease events and the event order is not correct.
The client application enables ibus:
% env XMODIFIERS=@im=ibus ./application
To reproduce this problem, need to set XNSpotLocation for XNPreeditAttributes:
XVaNestedList argList = XVaCreateNestedList(0, XNSpotLocation, &cursor_location, NULL); XSetICValues(windowData.ic, XNPreeditAttributes, argList, 0);