]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/themes/win32.cpp
fixed yet another bug in wxStream classes
[wxWidgets.git] / src / univ / themes / win32.cpp
index 349c3f088eafa740da07c1dadf63ea036199a456..3f682335bc7de6906d94ecf49ed77517bebb0db6 100644 (file)
@@ -1,4 +1,3 @@
-///////////////////////////////////////////////////////////////////////////////
 // Name:        univ/themes/win32.cpp
 // Purpose:     wxUniversal theme implementing Win32-like LNF
 // Author:      Vadim Zeitlin
@@ -3056,6 +3055,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;
 }