]> git.saurik.com Git - wxWidgets.git/commit
Fix focus handling logic in generic wxListCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 29 Mar 2012 00:10:53 +0000 (00:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 29 Mar 2012 00:10:53 +0000 (00:10 +0000)
commit22930be86cddbf792227bb471852c64b40f483f0
tree090dd4107973dc5dbac87bb07449e210659ed568
parent34326da778583ca8eab95f2e41738da2852a5a16
Fix focus handling logic in generic wxListCtrl.

Don't override SetFocus() to set the focus to the main window, this isn't
enough as we can be given the focus by the underlying toolkit itself, without
our SetFocus() being called -- this happened in wxGTK when focus was changed
from the keyboard using TAB and in this case it didn't get to the main window
but remaining on the wxListCtrl itself meaning that keyboard input wasn't
processed at all.

Use wxNavigationEnabled<> now to ensure that OnSetFocus() and related methods
do the right thing instead now.

Also get rid of OnSetFocus() in wxListHeaderWindow, it's better to override
AcceptsFocus() to return false to avoid getting focus in the first place.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/generic/listctrl.h
include/wx/generic/private/listctrl.h
src/generic/listctrl.cpp