X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a6e67b552cebaa5e57e7e8001bf3dc2721e794ec..baaae89f09ece7ab8a17570ee535683b9d14aeda:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 8ce7a97e2f..b280a33098 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -2421,9 +2421,15 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam y = GET_Y_LPARAM(lParam); // redirect the event to a static control if necessary - wxWindow *win = FindWindowForMouseEvent(this, &x, &y); - - processed = win->HandleMouseEvent(message, x, y, wParam); + if (this == GetCapture()) + { + processed = HandleMouseEvent(message, x, y, wParam); + } + else + { + wxWindow *win = FindWindowForMouseEvent(this, &x, &y); + processed = win->HandleMouseEvent(message, x, y, wParam); + } } } break;