From 42d8454f34316905c990e21802ccc83b98a8c5e6 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Wed, 26 May 2010 15:08:54 +0000 Subject: [PATCH] Backported wxComboCtrl::ShouldDrawFocus() from wxWidgets 2.9. This makes wxMSW wxOwnerDrawnComboBox look more native when wxCB_READONLY is used. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@64397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/combo.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/wx/combo.h b/include/wx/combo.h index d4840b1899..73ae300bb1 100644 --- a/include/wx/combo.h +++ b/include/wx/combo.h @@ -371,8 +371,8 @@ public: bool ShouldDrawFocus() const { const wxWindow* curFocus = FindFocus(); - return ( !IsPopupShown() && - (curFocus == this || (m_btn && curFocus == m_btn)) && + return ( IsPopupWindowState(Hidden) && + (curFocus == m_mainCtrlWnd || (m_btn && curFocus == m_btn)) && (m_windowStyle & wxCB_READONLY) ); }