From eb7117d97846b714d7933f20e2deef69576d514e Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Thu, 27 May 2010 20:03:07 +0000 Subject: [PATCH] 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 --- src/common/combocmn.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 ) { -- 2.50.0