]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/combo.cpp
Avoid using invalid parameters for GpiSetAttrs.
[wxWidgets.git] / src / msw / combo.cpp
index c51a4bc77e3d5645d078b28ab367f8f878962c59..401dc1033d282bd915cdca92743062afe770dfbe 100644 (file)
@@ -298,8 +298,14 @@ void wxComboCtrl::DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags )
     wxRect selRect(rect);
     selRect.y += focusSpacingY;
     selRect.height -= (focusSpacingY*2);
-    selRect.x += m_widthCustomPaint + focusSpacingX;
-    selRect.width -= m_widthCustomPaint + (focusSpacingX*2);
+
+    int wcp = 0;
+
+    if ( !(flags & wxCONTROL_ISSUBMENU) )
+        wcp += m_widthCustomPaint;
+
+    selRect.x += wcp + focusSpacingX;
+    selRect.width -= wcp + (focusSpacingX*2);
 
     if ( hTheme )
         theme = wxUxThemeEngine::GetIfActive();