From a386b9c6142df7631e160063a7b92995488b5e3e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 15 Nov 2012 18:48:55 +0000 Subject: [PATCH] Restore setting focus to generic wxDataViewCtrl on any mouse click. The changes of r72632 resulted in focus not being given to wxDataViewMainWindow on right or middle click, restore this behaviour. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 89bc7ebfc0..565814cc7a 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -3943,10 +3943,11 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) return; } - if(event.LeftDown()) + if(event.ButtonDown()) { - // Not skipping this event would prevent the system from setting focus - // to this window. + // Not skipping button down events would prevent the system from + // setting focus to this window as most (all?) of them do by default, + // so skip it to enable default handling. event.Skip(); } -- 2.45.2