Jukka Heinonen jhei@iki.fi writes:
Storing old windows procedure in struct x11drv_win_data would remove the worst race, but unless window procedure update is atomic, it would not remove all races.
Since you have the window locked when changing the wnd proc the update will be atomic. The only problem I see is that your wnd proc might get called to process some other message, but you can solve this by having it chain to the previous wnd proc for all messages except the special one.
"Alexandre Julliard" julliard@winehq.com wrote:
Jukka Heinonen jhei@iki.fi writes:
Storing old windows procedure in struct x11drv_win_data would remove the worst race, but unless window procedure update is atomic, it would not remove all races.
Since you have the window locked when changing the wnd proc the update will be atomic. The only problem I see is that your wnd proc might get called to process some other message, but you can solve this by having it chain to the previous wnd proc for all messages except the special one.
And it would be much better to not hardcode 0x7777 as the special message value, but use RegisterWindowMessage instead. -- Dmitry.