https://bugs.winehq.org/show_bug.cgi?id=13683
--- Comment #47 from Dmitry Timoshkov dmitry@baikal.ru --- (In reply to Christopher Thielen from comment #46)
Compiling the attached mouseylines.cpp (apologies for the name), Windows produces this:
WM_LBUTTONDOWN: setting capture WM_CAPTURECHANGED: lParam is 590262, hWnd is 590262, equal? = 1 WM_LBUTTONUP: releasing capture WM_CAPTURECHANGED: lParam is 0, hWnd is 590262, equal? = 0 WM_CAPTURECHANGED: lParam is 0, hWnd is 590262, equal? = 0
while Wine produces this:
WM_LBUTTONDOWN: setting capture WM_LBUTTONUP: releasing capture WM_CAPTURECHANGED: lParam is 0, hWnd is 65616, equal? = 0 WM_CAPTURECHANGED: lParam is 0, hWnd is 65616, equal? = 0
Note: All I do is launch the application then click the 'X' button to close.
I believe the missing WM_CAPTURECHANGED where lParam == hWnd is significant to tihs bug.
What you are observing with your test app (btw, it doesn't compile because of missing stdafx.h which has to be commented out) under Windows is completely the result of clicking on the close button on the caption, and that obviously have nothing to do neither with Wine (WM doesn't send events for mouse clicks on the caption to an X client app), nor with reproducing the source of this bug.