X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/47d67540a017101b3e46abe9ef0f55914d8de37e..8704bf74fba8523e2e174bd5a8195b5202009cd0:/src/motif/app.cpp?ds=sidebyside diff --git a/src/motif/app.cpp b/src/motif/app.cpp index d8df53ed4c..94e652a549 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -33,10 +33,6 @@ #include "wx/resource.h" #endif -#if wxUSE_POSTSCRIPT -#include "wx/postscrp.h" -#endif - #include #include #include @@ -91,9 +87,11 @@ bool wxApp::Initialize() // For PostScript printing #if wxUSE_POSTSCRIPT +/* Done using wxModule now wxInitializePrintSetupData(); wxThePrintPaperDatabase = new wxPrintPaperDatabase; wxThePrintPaperDatabase->CreateDatabase(); +*/ #endif wxBitmap::InitStandardHandlers(); @@ -137,9 +135,11 @@ void wxApp::CleanUp() wxTheColourDatabase = NULL; #if wxUSE_POSTSCRIPT +/* Done using wxModule now wxInitializePrintSetupData(FALSE); delete wxThePrintPaperDatabase; wxThePrintPaperDatabase = NULL; +*/ #endif wxBitmap::CleanUpHandlers(); @@ -247,6 +247,7 @@ wxApp::wxApp() m_appContext = (WXAppContext) NULL; m_topLevelWidget = (WXWidget) NULL; m_maxRequestSize = 0; + m_initialDisplay = (WXDisplay*) 0; } bool wxApp::Initialized() @@ -296,6 +297,8 @@ int wxApp::MainLoop() report = event; while( XCheckTypedWindowEvent (disp, win, ResizeRequest, &report)); } + // TODO: when implementing refresh optimization, we can use + // XtAddExposureToRegion to expand the window's paint region. XtDispatchEvent(&event); @@ -458,6 +461,8 @@ bool wxApp::OnInitGui() cerr << "wxWindows could not open display for " << wxTheApp->GetClassName() << ": exiting.\n"; exit(-1); } + m_initialDisplay = (WXDisplay*) dpy; + wxTheApp->m_topLevelWidget = (WXWidget) XtAppCreateShell((String)NULL, (const char*) wxTheApp->GetClassName(), applicationShellWidgetClass,dpy, NULL,0) ;