emulating wx' focus-lost behavior

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2012-11-27 13:23:46 +00:00
parent 9656c0dd1b
commit e5021b23c9

View file

@ -450,12 +450,19 @@ extern int wxOSXGetIdFromSelector(SEL action );
if ( wxpeer )
{
wxpeer->HandleActivated(0, false);
// as for wx the deactivation also means loosing focus we
// must trigger this manually
[window makeFirstResponder:nil];
// TODO Remove if no problems arise with Popup Windows
#if 0
// Needed for popup window since the firstResponder
// (focus in wx) doesn't change when this
// TLW becomes inactive.
wxFocusEvent event( wxEVT_KILL_FOCUS, wxpeer->GetId());
event.SetEventObject(wxpeer);
wxpeer->HandleWindowEvent(event);
#endif
}
}
}