http://bugs.winehq.org/show_bug.cgi?id=19095
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX
--- Comment #3 from Austin English austinenglish@gmail.com 2009-06-28 16:12:44 --- (In reply to comment #2)
Wine can't replicate exact Windows thread timing by design. I don't know if Windows magically protects the app Window shutdown sequence/handler from interleaving WM_CLOSE messages. Even if the code works for Windows it introduces nasty races which also depend on system utilization.
I suggest that you change the script code a bit. Instead of calling IfWinExist a single time directly after PostMessage, use a short loop. Call IfWinExist within that loop and if it still exists, do a bit sleep() before next iteration to give target process time to do a clean shutdown. Break when main window doesn't exist anymore. After predefined number of times also break the loop (target hangs whatever). Out of loop use WinKill() if the window still exists.
Done.
In my opinion this is WONTFIX.
Fine by me. I reported the bug in case it was a subtle wine bug, but I'm fine with adjusting the code to be safer.
Thanks for the analysis, even if it didn't fix a wine bug :-/.