Changed wxRootWindow from a global to a staic variable with an

accessor function that initializes if on first use.  This prevents
core dumps for apps that try to create wxBitmaps before the wxApp
object is initialized.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2001-05-11 17:55:28 +00:00
parent a90c95aa8e
commit c2fa61e833
12 changed files with 234 additions and 210 deletions

View File

@@ -46,7 +46,7 @@
// data
//-----------------------------------------------------------------------------
extern GtkWidget *wxRootWindow;
extern GtkWidget *wxGetRootWindow();
//----------------------------------------------------------------------------
// misc.
@@ -117,7 +117,7 @@ bool wxColourDisplay()
int wxDisplayDepth()
{
return gdk_window_get_visual( wxRootWindow->window )->depth;
return gdk_window_get_visual( wxGetRootWindow()->window )->depth;
}
int wxGetOsVersion(int *majorVsn, int *minorVsn)