From: Jaakko Salli Date: Thu, 27 May 2010 20:03:07 +0000 (+0000) Subject: In wxComboPopupExtraEventHandler::OnMouseEvent(): Also include wxEVT_LEFT_UP among... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/eb7117d97846b714d7933f20e2deef69576d514e In wxComboPopupExtraEventHandler::OnMouseEvent(): Also include wxEVT_LEFT_UP among the mouse events to be blocked when the cursor is outside the popup area. This fixes wxMSW bug where the popup disappears immediately after mouse button is released (see #12087). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64419 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index c5304c8850..ac52ecc81d 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -706,15 +706,15 @@ void wxComboPopupExtraEventHandler::OnMouseEvent( wxMouseEvent& event ) event.Skip(); - if ( evtType == wxEVT_MOTION || - evtType == wxEVT_LEFT_DOWN || - evtType == wxEVT_RIGHT_DOWN ) - { - // Block motion and click events outside the popup - if ( !isInside || !m_combo->IsPopupShown() ) - { - event.Skip(false); - } + // Block motion and click events outside the popup + if ( (!isInside || !m_combo->IsPopupShown()) + && + (evtType == wxEVT_MOTION || + evtType == wxEVT_LEFT_DOWN || + evtType == wxEVT_LEFT_UP || + evtType == wxEVT_RIGHT_DOWN) ) + { + event.Skip(false); } else if ( evtType == wxEVT_LEFT_UP ) {