From 0445ddf58d622ea3529b0e0ffa38319107f16726 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 4 Jul 2014 12:22:27 +0000 Subject: [PATCH] Skip mouse button release events in wxGenericListCtrl. This is similar to r76093 for wxGenericTreeCtrl and fixes a similar problem: clicking in a wxListCtrl inside wxNotebook confused GtkNotebook mouse tracking logic because it didn't get some events. Closes #16365. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 4 ++++ src/generic/listctrl.cpp | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 51634378cd..6c080eb811 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -582,6 +582,10 @@ All: - Fix silent data loss in wx[F]File::Write(wxString) if conversion fails. - Make wxString::FromCDouble() work when the global C++ locale is not the C one. +wxGTK: + +- Fix mouse handling in wxNotebook containing wxListCtrl (Charlie Fenton). + wxMSW: - Fix Cygwin 1.7 build. diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index bd5171face..f4d5fffc28 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2426,6 +2426,9 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) { // reset the selection and bail out HighlightAll(false); + + if ( event.LeftUp() ) + event.Skip(); } return; @@ -2501,6 +2504,8 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event ) } m_lineSelectSingleOnUp = (size_t)-1; + + event.Skip(); } else {