http://bugs.winehq.org/show_bug.cgi?id=58167
--- Comment #11 from Rémi Bernon rbernon@codeweavers.com --- I'm not able to reproduce minimization failures, but I'm able to reproduce a possibly similar issue when Pegasus Mail is first started, and another window is activated by clicking on it. The first time this is done after startup, Pegasus Mail window gets activated again instead of the window that was clicked on.
This seem to happen because Pegasus Mail calls SetFocus quickly after losing foreground (from a WM_USER+8991 application message posted when it receives WM_KILLFOCUS), which we translate into window activation request and the window manager. I've checked that on Windows the WM_USER+8991 is there too, I'm not sure whether it then calls SetFocus or not, and whether Windows is simply ignoring it. This will need some testing.
Then, this is possible the same thing happening with minimization here, although it's not 100% certain. The logs also seem to suggest that there's NtUserSetFocus calls right after the window is being minimized.