]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/glcanvas.cpp
Minimum is now GTK+ 2.4
[wxWidgets.git] / src / gtk / glcanvas.cpp
index 352246f4786263060459e84696acebb85d6bf8f1..ad811ae0a6ce3a79e7bf2bf91a5c6ecfb69491d3 100644 (file)
     #include "wx/module.h"
 #endif // WX_PRECOMP
 
-extern "C"
-{
-#include "gtk/gtk.h"
-#include "gdk/gdk.h"
-#include "gdk/gdkx.h"
-}
+#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
 
 #include "wx/gtk/win_gtk.h"
-#include "wx/gtk/private.h"
 
 #if WXWIN_COMPATIBILITY_2_8
 
@@ -78,8 +73,6 @@ extern "C" {
 static gboolean
 gtk_glwindow_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExpose *gdk_event, wxGLCanvas *win )
 {
-    // don't need to install idle handler, its done from "event" signal
-
     win->m_exposed = true;
 
     win->GetUpdateRegion().Union( gdk_event->area.x,
@@ -96,11 +89,10 @@ gtk_glwindow_expose_callback( GtkWidget *WXUNUSED(widget), GdkEventExpose *gdk_e
 
 extern "C" {
 static void
-gtk_glcanvas_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxGLCanvas *win )
+gtk_glcanvas_size_callback(GtkWidget *WXUNUSED(widget),
+                           GtkAllocation * WXUNUSED(alloc),
+                           wxGLCanvas *win)
 {
-    if (g_isIdle)
-        wxapp_install_idle_handler();
-
     if (!win->m_hasVMT)
         return;
 
@@ -185,8 +177,10 @@ bool wxGLCanvas::Create(wxWindow *parent,
                         long style,
                         const wxString& name,
                         const int *attribList,
-                        const wxPalette& palette)
+                        const wxPalette& WXUNUSED_UNLESS_DEBUG(palette))
 {
+    wxASSERT_MSG( !palette.IsOk(), _T("palettes not supported") );
+
     m_exposed = false;
     m_noExpose = true;
     m_nativeSizeEvent = true;