user32 - set_active_window uses SendMessage instead of PostMessage for WM_ACTIVATEAPP messages.

Peter Dons Tychsen donpedro at tdcadsl.dk
Thu Aug 2 16:01:05 CDT 2007


Hello Wine.

On original Windows, the messages WM_ACTIVATEAPP are sent using
PostMessage() and not SendMessage() like in the current Wine
implementation.

I have thoroughly verified that this is the case on Windows-XP (that it
uses PostMessage()). 

This error can lead to fatal focusing problems, as some programs call
more focus related functions when they receive this message. This leads
to recursive calls into set_active_calls. It does not crash, but leads
to unexpected results such as lost focus for mouse and keyboard.

This fixes the focus for the game "Wild Metal" if you switch focus from
the game to the desktop, and then back again.

http://www.rockstargames.com/classics/

Cheers,

/Pedro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Dont-use-SendMessage-but-the-async.-PostMessage.patch
Type: application/mbox
Size: 2070 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070802/9519341b/0001-Dont-use-SendMessage-but-the-async.-PostMessage.bin


More information about the wine-patches mailing list