http://bugs.winehq.org/show_bug.cgi?id=22985
--- Comment #2 from Andrew Gvo agvozdik@bradontechnologies.com 2010-05-31 16:25:42 --- (In reply to comment #1)
Probably a duplicate of bug 22941. Try to revert commit mentioned there.
Yes, it is working properly now. I did revert commit mentioned in 22941:
winex11.drv: Simulate pressing Alt+F4 instead of clicking the caption Close button when handling the WM_DELETE_WINDOW event.