http://bugs.winehq.org/show_bug.cgi?id=3023
--- Comment #27 from Erich Hoover ehoover@mines.edu 2011-01-26 10:27:47 CST --- Created an attachment (id=33000) --> (http://bugs.winehq.org/attachment.cgi?id=33000) Test focus with end dialog
(In reply to comment #25)
Eliot Blennerhassett sent in a patch, http://www.winehq.org/pipermail/wine-patches/2010-July/090363.html but Alexandre replied with "needs tests". Anyone who can write a test that fails without that patch but passes with it, please do!
You're not going to like to hear this, but I tried to make a test to show that the fix works and I instead ended up demonstrating that it introduces a bug. I've attached a patch that modifies the "msg" test to (pretty much) just run the test of interest. When you run this test with the "fix" it will report that the dialog itself is the active window after EndDialog is called, which is not the case when you run the test on Windows. If I had to guess then I'd say that WINPOS_ActivateOtherWindow is getting called at the wrong time, probably that OrCad captures some window notification event, changes the active window, and then we override it when we call WINPOS_ActivateOtherWindow.