http://bugs.winehq.org/show_bug.cgi?id=16346
--- Comment #10 from Dan Kegel dank@kegel.com 2012-06-23 18:18:12 CDT --- Created attachment 40669 --> http://bugs.winehq.org/attachment.cgi?id=40669 Resource file for plain C test case
I've investigated this a bit with the attached plain C test app. It seems that the handler for the X event carrying WM_TAKE_FOCUS calls SetForegroundWindow, and during that call, the entire sequence of events from parent's WM_ACTIVATEAPP up until the modal dialog is dismissed happens. That's a long event handler.