removed SetFocus() call in WM_LBUTTONDOWN handler once again: it is *WRONG*, please let me know if there is any problem this is supposed to fix but don't put it back

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-06-18 00:40:19 +00:00
parent 1dae1d0098
commit 03e0b2b1ff

View File

@ -2446,28 +2446,36 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam
break;
}
if (!processed)
if ( processed )
break;
#endif // __WXMICROWIN__
// VZ: if you find a situation when this is needed, tell
// me about it, do *not* uncomment this code as it
// causes other strange problems
#if 0
if ( message == WM_LBUTTONDOWN && AcceptsFocus() )
SetFocus();
#endif // 0
int x = GET_X_LPARAM(lParam),
y = GET_Y_LPARAM(lParam);
// redirect the event to a static control if necessary by
// finding one under mouse
wxWindowMSW *win;
if ( GetCapture() == this )
{
// VZ: why do we need it here? DefWindowProc() is supposed
// to do this for us anyhow
if ( message == WM_LBUTTONDOWN && AcceptsFocus() )
SetFocus();
int x = GET_X_LPARAM(lParam),
y = GET_Y_LPARAM(lParam);
// redirect the event to a static control if necessary
if (this == GetCapture())
{
processed = HandleMouseEvent(message, x, y, wParam);
}
else
{
wxWindowMSW *win = FindWindowForMouseEvent(this, &x, &y); //TW:REQ:Univ
processed = win->HandleMouseEvent(message, x, y, wParam);
}
// but don't do it if the mouse is captured by this window
// because then it should really get this event itself
win = this;
}
else
{
win = FindWindowForMouseEvent(this, &x, &y);
}
processed = win->HandleMouseEvent(message, x, y, wParam);
}
break;