]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/bitmap.cpp
Make the app object be global in case it is run multiple times, such
[wxWidgets.git] / src / gtk / bitmap.cpp
index e8009a37ed3c7c0861669c22a580d2284e7f9eca..4a0e1111f1d74a6360a6e26b75056b13daa317a1 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/defs.h"
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/dcmemory.h"
+#endif
 
 #include "wx/bitmap.h"
 #include "wx/palette.h"
 #include "wx/icon.h"
 #include "wx/filefn.h"
 #include "wx/image.h"
-#include "wx/dcmemory.h"
-#include "wx/app.h"
 
 #include "wx/rawbmp.h"
     // need this to get gdk_image_new_bitmap()
@@ -346,7 +347,7 @@ bool wxBitmap::CreateFromXpm( const char **bits )
         M_BMPDATA->m_mask->m_bitmap = mask;
     }
 
-    gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
+    gdk_drawable_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
 
     M_BMPDATA->m_bpp = visual->depth;  // Can we get a different depth from create_from_xpm_d() ?
 
@@ -1339,7 +1340,7 @@ bool wxBitmap::LoadFile( const wxString &name, wxBitmapType type )
            M_BMPDATA->m_mask->m_bitmap = mask;
         }
 
-        gdk_window_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
+        gdk_drawable_get_size( M_BMPDATA->m_pixmap, &(M_BMPDATA->m_width), &(M_BMPDATA->m_height) );
 
         M_BMPDATA->m_bpp = visual->depth;
     }