git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11909
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxTopLevelWindows.Append(this);
m_title = title;
wxTopLevelWindows.Append(this);
m_title = title;
-
- // FIXME_MGL -- should activate itself when shown!
bool wxTopLevelWindowMGL::Show(bool show)
{
bool ret = wxTopLevelWindowBase::Show(show);
bool wxTopLevelWindowMGL::Show(bool show)
{
bool ret = wxTopLevelWindowBase::Show(show);
+ if ( ret && show && AcceptsFocus() )
+ // FIXME_MGL -- don't do this for popup windows?
#if wxUSE_SYSTEM_OPTIONS
// FIXME_MGL -- so what is The Proper Way?
#if wxUSE_SYSTEM_OPTIONS
// FIXME_MGL -- so what is The Proper Way?
if ( wxSystemOptions::HasOption(wxT("mgl.screen-width") )
width = wxSystemOptions::GetOptionInt(wxT("mgl.screen-width"));
if ( wxSystemOptions::HasOption(wxT("mgl.screen-height") )
if ( wxSystemOptions::HasOption(wxT("mgl.screen-width") )
width = wxSystemOptions::GetOptionInt(wxT("mgl.screen-width"));
if ( wxSystemOptions::HasOption(wxT("mgl.screen-height") )
static void wxWindowPainter(window_t *wnd, MGLDC *dc)
{
wxWindowMGL *w = (wxWindow*) wnd->userData;
static void wxWindowPainter(window_t *wnd, MGLDC *dc)
{
wxWindowMGL *w = (wxWindow*) wnd->userData;
if ( w && !(w->GetWindowStyle() & wxTRANSPARENT_WINDOW) )
{
MGLDevCtx ctx(dc);
if ( w && !(w->GetWindowStyle() & wxTRANSPARENT_WINDOW) )
{
MGLDevCtx ctx(dc);
#endif // wxUSE_CARET
wxWindowMGL *active = wxGetTopLevelParent(this);
#endif // wxUSE_CARET
wxWindowMGL *active = wxGetTopLevelParent(this);
- if ( active != gs_activeFrame )
+ if ( !(m_windowStyle & wxPOPUP_WINDOW) && active != gs_activeFrame )
{
if ( gs_activeFrame )
{
{
if ( gs_activeFrame )
{
wxFocusEvent event(wxEVT_SET_FOCUS, GetId());
event.SetEventObject(this);
wxFocusEvent event(wxEVT_SET_FOCUS, GetId());
event.SetEventObject(this);
- GetEventHandler()->ProcessEvent(event);
+ AddPendingEvent(event);
}
void wxWindowMGL::KillFocus()
}
void wxWindowMGL::KillFocus()
caret->OnKillFocus();
#endif // wxUSE_CARET
caret->OnKillFocus();
#endif // wxUSE_CARET
- if ( IsTopLevel() )
- {
- // FIXME_MGL - this is wrong, see wxGTK!
- wxActivateEvent event(wxEVT_ACTIVATE, FALSE, GetId());
- event.SetEventObject(this);
- GetEventHandler()->ProcessEvent(event);
- }
-
wxFocusEvent event(wxEVT_KILL_FOCUS, GetId());
event.SetEventObject(this);
wxFocusEvent event(wxEVT_KILL_FOCUS, GetId());
event.SetEventObject(this);
- GetEventHandler()->ProcessEvent(event);
+ AddPendingEvent(event);
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
void wxWindowMGL::Refresh(bool eraseBack, const wxRect *rect)
{
if ( m_eraseBackground == -1 )
void wxWindowMGL::Refresh(bool eraseBack, const wxRect *rect)
{
if ( m_eraseBackground == -1 )