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:
@@ -2446,29 +2446,37 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!processed)
|
if ( processed )
|
||||||
|
break;
|
||||||
|
|
||||||
#endif // __WXMICROWIN__
|
#endif // __WXMICROWIN__
|
||||||
{
|
// VZ: if you find a situation when this is needed, tell
|
||||||
// VZ: why do we need it here? DefWindowProc() is supposed
|
// me about it, do *not* uncomment this code as it
|
||||||
// to do this for us anyhow
|
// causes other strange problems
|
||||||
|
#if 0
|
||||||
if ( message == WM_LBUTTONDOWN && AcceptsFocus() )
|
if ( message == WM_LBUTTONDOWN && AcceptsFocus() )
|
||||||
SetFocus();
|
SetFocus();
|
||||||
|
#endif // 0
|
||||||
|
|
||||||
int x = GET_X_LPARAM(lParam),
|
int x = GET_X_LPARAM(lParam),
|
||||||
y = GET_Y_LPARAM(lParam);
|
y = GET_Y_LPARAM(lParam);
|
||||||
|
|
||||||
// redirect the event to a static control if necessary
|
// redirect the event to a static control if necessary by
|
||||||
if (this == GetCapture())
|
// finding one under mouse
|
||||||
|
wxWindowMSW *win;
|
||||||
|
if ( GetCapture() == this )
|
||||||
{
|
{
|
||||||
processed = 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
|
else
|
||||||
{
|
{
|
||||||
wxWindowMSW *win = FindWindowForMouseEvent(this, &x, &y); //TW:REQ:Univ
|
win = FindWindowForMouseEvent(this, &x, &y);
|
||||||
|
}
|
||||||
|
|
||||||
processed = win->HandleMouseEvent(message, x, y, wParam);
|
processed = win->HandleMouseEvent(message, x, y, wParam);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef MM_JOY1MOVE
|
#ifdef MM_JOY1MOVE
|
||||||
|
Reference in New Issue
Block a user