#include "wx/listbox.h"
#include "wx/scrolwin.h"
#include "wx/layout.h"
+ #include "wx/menuitem.h"
+ #include "wx/module.h"
#endif
-#include "wx/module.h"
-#include "wx/menuitem.h"
#include "wx/fontutil.h"
#include "wx/univ/renderer.h"
}
// Destroy the window
- Window xwindow = (Window) m_mainWindow;
- wxDeleteWindowFromTable( xwindow );
- XDestroyWindow( wxGlobalDisplay(), xwindow );
- m_mainWindow = NULL;
+ if ( m_mainWindow )
+ {
+ Window xwindow = (Window) m_mainWindow;
+ wxDeleteWindowFromTable( xwindow );
+ XDestroyWindow( wxGlobalDisplay(), xwindow );
+ m_mainWindow = NULL;
+ }
}
// ---------------------------------------------------------------------------
ms.SetControlDown(mask & ControlMask);
ms.SetShiftDown(mask & ShiftMask);
- ms.SetAltDown(mask & Mod1Mask);
- ms.SetMetaDown(mask & Mod2Mask);
+ ms.SetAltDown(mask & Mod3Mask);
+ ms.SetMetaDown(mask & Mod1Mask);
return ms;
}
class wxWinModule : public wxModule
{
public:
- bool OnInit();
- void OnExit();
+ wxWinModule()
+ {
+ // we must be cleaned up before the display is closed
+ AddDependency(wxClassInfo::FindClass(_T("wxX11DisplayModule")));
+ }
+
+ virtual bool OnInit();
+ virtual void OnExit();
private:
DECLARE_DYNAMIC_CLASS(wxWinModule)