X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b4651028a315ed881858165675667fdaef58d6c..9cf99fc093f9c45b6b5d8d8b357699d826c9916a:/src/univ/themes/win32.cpp?ds=inline diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 716bcc0ec9..3f682335bc 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 @@ -1090,8 +1089,6 @@ wxColour wxWin32ColourScheme::Get(wxWin32ColourScheme::StdColour col) const { switch ( col ) { - case WINDOW: return *wxWHITE; - // use the system colours under Windows #if defined(__WXMSW__) case WINDOW: return wxColour(GetSysColor(COLOR_WINDOW)); @@ -1123,6 +1120,8 @@ wxColour wxWin32ColourScheme::Get(wxWin32ColourScheme::StdColour col) const case SHADOW_OUT: return wxColour(GetSysColor(COLOR_BTNSHADOW)); #else // !__WXMSW__ // use the standard Windows colours elsewhere + case WINDOW: return *wxWHITE; + case CONTROL_PRESSED: case CONTROL_CURRENT: case CONTROL: return wxColour(0xc0c0c0); @@ -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; }