http://bugs.winehq.org/show_bug.cgi?id=13765
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2008-06-12 14:14:53 --- The bug is that the app doesn't expect MsgWaitForMultipleObjects to return until it's done, but it returns because we receive an X event. There's nothing wrong with the XIM code, it just triggers an extra event in that case.
The proper fix is to implement HWND_MESSAGE and/or initialize display connection later (when first window is displayed).