X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/86313763baa3ad4d1ac0eafe9d2f20eac784d41e..e3556282410eb387e426d68076403fa69f2b669f:/src/univ/themes/win32.cpp diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 349c3f088e..fae4a4a885 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -1,4 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////// // Name: univ/themes/win32.cpp // Purpose: wxUniversal theme implementing Win32-like LNF // Author: Vadim Zeitlin @@ -39,6 +38,11 @@ #include "wx/scrolbar.h" #include "wx/slider.h" #include "wx/textctrl.h" + + #ifdef __WXMSW__ + // for COLOR_* constants + #include "wx/msw/private.h" + #endif #endif // WX_PRECOMP #include "wx/notebook.h" @@ -3056,6 +3060,14 @@ bool wxWin32InputHandler::HandleKey(wxControl *control, bool wxWin32InputHandler::HandleMouse(wxControl *control, const wxMouseEvent& event) { + // clicking on the control gives it focus + if ( event.ButtonDown() && wxWindow::FindFocus() != control ) + { + control->SetFocus(); + + return TRUE; + } + return FALSE; }