Skip to content

Wxwidgets x11 glcanvas

Thibault Guittet edited this page Sep 25, 2013 · 16 revisions

Functions to modify

  • src/gtk/glcanvas.cpp :

** line 170 : wxGLCanvas::wxGLCanvas() construction function calls Create() -> src/gtk/window.cpp wxWindowGTK::Create() -> src/common/wincmn.cpp wxWindow::CreateBase() -> CreateBase() -> SetParent() which fails.

Commenting the SetParent() function avoids hang when program starts -see why. Idea : the GLCanvas may have no parent.

** line 273 : wxGLCanvas::GetXWindow() : return a (X11) Window from a GdkWindow returned by neutral GTKGetDrawingWindow()

NOTE : even if we don't call it explicitly, it's used during every client program compilation -commenting it or putting between X11 #ifdefs makes undefined references - -see why

  • include/wx/utils.h :

** line 772 : wxGetDisplay() function for GTK+ returns void*, which can't be converted to GDKDisplay. Make it return GdkDisplay.

** line 785 : wrapper function wxGetX11Display() returns (X11) Display from wxGetDisplay(). As this now returns GdkDisplay, make it return X11 (Display) via gdk_x11_display_get_xdisplay().

  • src/gtk/utilsgtk.cpp :

** line 78 : wxGetDisplay() should return a GdkDisplay with a neutral function such a gtk_display_get_default().

  • src/gtk/window.cpp

** line 51 : KeySym type should be defined only with X11.

  • building tries to Scintilla library, with many X11 calls. Disable it with : --disable-stc
Clone this wiki locally