implemented wxActivateEvent and restoring focus after a TLW that owned it was destroyed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46207 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -94,25 +94,6 @@ wxWindowDFB::~wxWindowDFB()
|
||||
if ( gs_mouseCapture == this )
|
||||
ReleaseMouse();
|
||||
|
||||
#warning "FIXME: what to do with gs_activeFrame here and elsewhere?"
|
||||
#if 0
|
||||
if (gs_activeFrame == this)
|
||||
{
|
||||
gs_activeFrame = NULL;
|
||||
// activate next frame in Z-order:
|
||||
if ( m_wnd->prev )
|
||||
{
|
||||
wxWindowDFB *win = (wxWindowDFB*)m_wnd->prev->userData;
|
||||
win->SetFocus();
|
||||
}
|
||||
else if ( m_wnd->next )
|
||||
{
|
||||
wxWindowDFB *win = (wxWindowDFB*)m_wnd->next->userData;
|
||||
win->SetFocus();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( gs_focusedWindow == this )
|
||||
DFBKillFocus();
|
||||
|
||||
@@ -221,26 +202,6 @@ void wxWindowDFB::SetFocus()
|
||||
// are hidden; when the TLW becomes visible, it will set the focus
|
||||
// to use from wxTLW::Show()
|
||||
|
||||
#warning "FIXME: implement in terms of DWET_{GOT,LOST}FOCUS"
|
||||
#warning "FIXME: keep this or not? not, think multiapp core"
|
||||
#if 0
|
||||
wxWindowDFB *active = wxGetTopLevelParent((wxWindow*)this);
|
||||
if ( !(m_windowStyle & wxPOPUP_WINDOW) && active != gs_activeFrame )
|
||||
{
|
||||
if ( gs_activeFrame )
|
||||
{
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, false, gs_activeFrame->GetId());
|
||||
event.SetEventObject(gs_activeFrame);
|
||||
gs_activeFrame->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
gs_activeFrame = active;
|
||||
wxActivateEvent event(wxEVT_ACTIVATE, true, gs_activeFrame->GetId());
|
||||
event.SetEventObject(gs_activeFrame);
|
||||
gs_activeFrame->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
#endif
|
||||
|
||||
// notify the parent keeping track of focus for the kbd navigation
|
||||
// purposes that we got it
|
||||
wxChildFocusEvent eventFocus((wxWindow*)this);
|
||||
@@ -301,30 +262,6 @@ bool wxWindowDFB::Show(bool show)
|
||||
// parent area at the place of this window (if hiding):
|
||||
DoRefreshWindow();
|
||||
|
||||
#warning "FIXME: all of this must be implemented for DFB"
|
||||
#if 0
|
||||
DFB_wmShowWindow(m_wnd, show);
|
||||
|
||||
if (!show && gs_activeFrame == this)
|
||||
{
|
||||
// activate next frame in Z-order:
|
||||
if ( m_wnd->prev )
|
||||
{
|
||||
wxWindowDFB *win = (wxWindowDFB*)m_wnd->prev->userData;
|
||||
win->SetFocus();
|
||||
}
|
||||
else if ( m_wnd->next )
|
||||
{
|
||||
wxWindowDFB *win = (wxWindowDFB*)m_wnd->next->userData;
|
||||
win->SetFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
gs_activeFrame = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user