X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/25466131acbbca2186d01fb852d61f50ba968fb4..7482aa1909432c4690fb02a54cfcc59ad9ed6b71:/src/x11/window.cpp diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 7c5cc615f2..9c5f6f49b8 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -46,9 +46,9 @@ #include "wx/scrolwin.h" #include "wx/layout.h" #include "wx/menuitem.h" + #include "wx/module.h" #endif -#include "wx/module.h" #include "wx/fontutil.h" #include "wx/univ/renderer.h" @@ -1694,8 +1694,14 @@ int wxNoOptimize::ms_count = 0; 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)