Main change is that we now close X11 display on program exit: as this couldn't
be done in wxApp dtor (too early), a special module had to be created for it and module dependencies added for the other modules which have to be cleaned up while the display is still open. Also a few minor formatting changes and removed a couple of unused variables from wxApp. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2366,8 +2366,15 @@ wxPaintDC::wxPaintDC(wxWindow* window)
|
||||
class wxDCModule : public wxModule
|
||||
{
|
||||
public:
|
||||
bool OnInit();
|
||||
void OnExit();
|
||||
// we must be cleaned up before wxDisplayModule which closes the global
|
||||
// display
|
||||
wxDCModule()
|
||||
{
|
||||
AddDependency(wxClassInfo::FindClass(_T("wxX11DisplayModule")));
|
||||
}
|
||||
|
||||
bool OnInit() { wxInitGCPool(); return true; }
|
||||
void OnExit() { wxCleanUpGCPool(); }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxDCModule)
|
||||
@@ -2375,13 +2382,3 @@ private:
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxDCModule, wxModule)
|
||||
|
||||
bool wxDCModule::OnInit()
|
||||
{
|
||||
wxInitGCPool();
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxDCModule::OnExit()
|
||||
{
|
||||
wxCleanUpGCPool();
|
||||
}
|
||||
|
Reference in New Issue
Block a user