Fix tree control focus issues on OS X (and possibly others) caused by toplevel.cpp not giving focus if children eat the LEFT_DOWN event... added event.Skip() on LeftDown() (whether an item is hit or not) after all dragging and moving conditions have been considered so that LEFT_DOWN events are never eaten by the tree preventing receiving focus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
b50732d9c4
commit
e4899fd770
@ -3129,6 +3129,16 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// If we got to this point, we are not dragging or moving the mouse.
|
||||||
|
// Because the code in carbon/toplevel.cpp will only set focus to the tree
|
||||||
|
// if we skip for EVT_LEFT_DOWN, we MUST skip this event here for focus to work.
|
||||||
|
// We skip even if we didn't hit an item because we still should
|
||||||
|
// restore focus to the tree control even if we didn't exactly hit an item.
|
||||||
|
if ( event.LeftDown() )
|
||||||
|
{
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
// here we process only the messages which happen on tree items
|
// here we process only the messages which happen on tree items
|
||||||
|
|
||||||
m_dragCount = 0;
|
m_dragCount = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user