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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user