X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4bb6408c2631988fab9925014c6619358bf867de..8704bf74fba8523e2e174bd5a8195b5202009cd0:/src/motif/app.cpp diff --git a/src/motif/app.cpp b/src/motif/app.cpp index dc3f61a7e6..94e652a549 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -29,14 +29,10 @@ #include "wx/module.h" #include "wx/memory.h" -#if USE_WX_RESOURCES +#if wxUSE_WX_RESOURCES #include "wx/resource.h" #endif -#if USE_POSTSCRIPT -#include "wx/postscrp.h" -#endif - #include #include #include @@ -71,7 +67,7 @@ bool wxApp::Initialize() wxBuffer = new char[BUFSIZ + 512]; #endif -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT +#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT streambuf* sBuf = new wxDebugStreamBuf; ostream* oStr = new ostream(sBuf) ; @@ -85,15 +81,17 @@ bool wxApp::Initialize() wxTheColourDatabase->Initialize(); wxInitializeStockObjects(); -#if USE_WX_RESOURCES +#if wxUSE_WX_RESOURCES wxInitializeResourceSystem(); #endif // For PostScript printing -#if USE_POSTSCRIPT +#if wxUSE_POSTSCRIPT +/* Done using wxModule now wxInitializePrintSetupData(); wxThePrintPaperDatabase = new wxPrintPaperDatabase; wxThePrintPaperDatabase->CreateDatabase(); +*/ #endif wxBitmap::InitStandardHandlers(); @@ -113,7 +111,7 @@ void wxApp::CleanUp() wxModule::CleanUpModules(); -#if USE_WX_RESOURCES +#if wxUSE_WX_RESOURCES wxCleanUpResourceSystem(); #endif @@ -136,10 +134,12 @@ void wxApp::CleanUp() delete wxTheColourDatabase; wxTheColourDatabase = NULL; -#if USE_POSTSCRIPT +#if wxUSE_POSTSCRIPT +/* Done using wxModule now wxInitializePrintSetupData(FALSE); delete wxThePrintPaperDatabase; wxThePrintPaperDatabase = NULL; +*/ #endif wxBitmap::CleanUpHandlers(); @@ -210,7 +210,7 @@ int wxEntry( int argc, char *argv[] ) delete wxTheApp; wxTheApp = NULL; -#if (WXDEBUG && USE_MEMORY_TRACING) || USE_DEBUG_CONTEXT +#if (WXDEBUG && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT // At this point we want to check if there are any memory // blocks that aren't part of the wxDebugContext itself, // as a special case. Then when dumping we need to ignore @@ -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) ;