]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/themes/win32.cpp
restore SetSelection(-1, -1) behaviour which was broken during wxTextEntry refactoring
[wxWidgets.git] / src / univ / themes / win32.cpp
index 12b176ac044dbfefd0f3f632dc9e5534293fed76..40475959a0d569be0d3c465200e882db776e1f88 100644 (file)
@@ -2053,7 +2053,7 @@ void wxWin32Renderer::DrawSliderShaft(wxDC& dc,
     */
 
     if (flags & wxCONTROL_FOCUSED) {
     */
 
     if (flags & wxCONTROL_FOCUSED) {
-        DrawFocusRect(dc, rectOrig);
+        DrawFocusRect(NULL, dc, rectOrig);
     }
 
     wxRect rect = GetSliderShaftRect(rectOrig, lenThumb, orient, style);
     }
 
     wxRect rect = GetSliderShaftRect(rectOrig, lenThumb, orient, style);
@@ -2505,7 +2505,7 @@ wxMenuGeometryInfo *wxWin32Renderer::GetMenuGeometry(wxWindow *win,
             h = heightText;
 
             wxCoord widthLabel;
             h = heightText;
 
             wxCoord widthLabel;
-            dc.GetTextExtent(item->GetLabel(), &widthLabel, NULL);
+            dc.GetTextExtent(item->GetItemLabelText(), &widthLabel, NULL);
             if ( widthLabel > widthLabelMax )
             {
                 widthLabelMax = widthLabel;
             if ( widthLabel > widthLabelMax )
             {
                 widthLabelMax = widthLabel;
@@ -3196,10 +3196,9 @@ bool wxWin32InputHandler::HandleMouse(wxInputConsumer *control,
     // clicking on the control gives it focus
     if ( event.ButtonDown() )
     {
     // clicking on the control gives it focus
     if ( event.ButtonDown() )
     {
-        wxWindow *win = control->GetInputWindow();
+        wxWindow * const win = control->GetInputWindow();
 
 
-        if ( (wxWindow::FindFocus() != control->GetInputWindow()) &&
-             win->AcceptsFocus() )
+        if ( win->CanAcceptFocus() && wxWindow::FindFocus() != win )
         {
             win->SetFocus();
 
         {
             win->SetFocus();