http://bugs.winehq.org/show_bug.cgi?id=31882
--- Comment #49 from Henri Verbeet hverbeet@gmail.com 2012-10-27 01:17:47 CDT --- Created attachment 42273 --> http://bugs.winehq.org/attachment.cgi?id=42273 patch
Actually, the attached patch seems fairly good at avoiding the issue. I'm not quite familiar enough with all the code to judge how proper this is, but the basic idea is to avoid making X11 calls until message handler has had a chance to finish.