http://bugs.winehq.org/show_bug.cgi?id=18899
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com 2011-05-12 15:53:49 CDT --- Created an attachment (id=34668) --> (http://bugs.winehq.org/attachment.cgi?id=34668) patch
They relay WM_RBUTTONDOWN as WM_LBUTTONDOWN in a first place in subclass procedure so control never gets it:
--- TabBar.cpp ---- case WM_RBUTTONDOWN : //rightclick selects tab aswell { ::CallWindowProc(_tabBarDefaultProc, hwnd, WM_LBUTTONDOWN, wParam, lParam); return TRUE; } ---
Wine's control sends NM_RCLICK notification after WM_RBUTTONDOWN (so it doesn't in this case). Simple test with ControlSpy with default Tab behaviour shows that NM_RCLICK is sent on mouse release, so after WM_RBUTTONUP.
Attached patch fixes this.