]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/glcanvas.cpp
correcting CGImage handling to be always correctly initialized and freed on OSX build...
[wxWidgets.git] / src / gtk / glcanvas.cpp
index d81c4cbe575c280d1d64787f98f4901f4b9357d9..688402fd9991ec5598bbd9ce09dd20bdda661284 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "glcanvas.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -401,7 +397,7 @@ bool wxGLCanvas::Create( wxWindow *parent,
     GdkColormap *colormap;
 
     // MR: This needs a fix for lower gtk+ versions too. Might need to rethink logic (FIXME)
     GdkColormap *colormap;
 
     // MR: This needs a fix for lower gtk+ versions too. Might need to rethink logic (FIXME)
-#if GTK_CHECK_VERSION(2,2,0)
+#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2,2,0)
     if (!gtk_check_version(2,2,0))
     {
         wxWindow::Create( parent, id, pos, size, style, name );
     if (!gtk_check_version(2,2,0))
     {
         wxWindow::Create( parent, id, pos, size, style, name );
@@ -456,7 +452,9 @@ bool wxGLCanvas::Create( wxWindow *parent,
     gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
         GTK_SIGNAL_FUNC(gtk_glcanvas_size_callback), (gpointer)this );
 
     gtk_signal_connect( GTK_OBJECT(m_widget), "size_allocate",
         GTK_SIGNAL_FUNC(gtk_glcanvas_size_callback), (gpointer)this );
 
+#ifdef __WXGTK20__
     if (gtk_check_version(2,2,0) != NULL)
     if (gtk_check_version(2,2,0) != NULL)
+#endif
     {
         gtk_widget_pop_visual();
         gtk_widget_pop_colormap();
     {
         gtk_widget_pop_visual();
         gtk_widget_pop_colormap();