wxWindow *sbar = NULL;
wxWindow *win = (wxWindow *)event.GetEventObject();
+
switch ( win->HitTest(pos.x, pos.y) )
{
case wxHT_WINDOW_OUTSIDE:
// when we lose focus we always disappear - unless it goes to the popup (in
// which case we don't really lose it)
- if ( event.GetWindow() != m_popup )
- m_popup->DismissAndNotify();
+ wxWindow *win = event.GetWindow();
+ while ( win )
+ {
+ if ( win == m_popup )
+ return;
+ win = win->GetParent();
+ }
+
+ printf( "Dismiss now.\n" );
+
+ m_popup->DismissAndNotify();
}
void wxPopupFocusHandler::OnKeyDown(wxKeyEvent& event)