#if wxUSE_SYSTEM_OPTIONS
// FIXME_MGL -- so what is The Proper Way?
+ width=800, height=600;
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;
+
if ( w && !(w->GetWindowStyle() & wxTRANSPARENT_WINDOW) )
{
MGLDevCtx ctx(dc);
if (gs_activeFrame == this)
{
+ gs_activeFrame = NULL;
// activate next frame in Z-order:
if ( m_wnd->prev )
{
wxWindowMGL *win = (wxWindowMGL*)m_wnd->prev->userData;
win->SetFocus();
}
- gs_activeFrame = NULL;
}
if ( gs_focusedWindow == this )
#endif // wxUSE_CARET
wxWindowMGL *active = wxGetTopLevelParent(this);
- if ( active != gs_activeFrame )
+ if ( !(m_windowStyle & wxPOPUP_WINDOW) && active != gs_activeFrame )
{
if ( gs_activeFrame )
{
wxFocusEvent event(wxEVT_SET_FOCUS, GetId());
event.SetEventObject(this);
- GetEventHandler()->ProcessEvent(event);
+ AddPendingEvent(event);
}
void wxWindowMGL::KillFocus()
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);
- GetEventHandler()->ProcessEvent(event);
+ AddPendingEvent(event);
}
// ----------------------------------------------------------------------------
return FALSE;
MGL_wmShowWindow(m_wnd, show);
+
+ if (!show && gs_activeFrame == this)
+ {
+ // activate next frame in Z-order:
+ if ( m_wnd->prev )
+ {
+ wxWindowMGL *win = (wxWindowMGL*)m_wnd->prev->userData;
+ win->SetFocus();
+ }
+ }
+
return TRUE;
}
dc.Clear();
}
+#include "wx/menu.h"
void wxWindowMGL::Refresh(bool eraseBack, const wxRect *rect)
{
if ( m_eraseBackground == -1 )