https://bugs.winehq.org/show_bug.cgi?id=34594
--- Comment #16 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Dmitry Timoshkov from comment #12)
Created attachment 56536 [details] patch
Chessmaster's menu implementation depends on WM_WINDOWPOSCHANGED message sent to (a being deactivated) menu window when one clicks on the main window.
Attached patch fixes the problem with menu deactivation in Chessmaster, but may be a not proper fix, and there might be some side effects.
This needs more investigation.
Probably the described behaviour is specific for topmost windows.
It seems that when main window gets activated in order to keep the menu window (which is topmost) on top of main window the system re-arranges windows which leads to WM_WINDOWPOSCHANGING+WM_WINDOWPOSCHANGED messages sent. Since Wine uses WM features to manage topmost windows there is no need for Wine to actually re-arrange the windows, Wine just needs to somehow emulate the expected by applications message sequences.
Probably the attached patch may be improved by adding some checks for a deactivated window being topmost (WS_EX_TOPMOST style bit) and add SWP_NOZORDER in addition to SWP_NOACTIVATE to avoid unwanted side effects. Another approach is to move SetWindowPos() call to x11drv's window activation handling code.