Avoid including X11 headers from <wx/glcanvas.h>

It's generally wxWidgets policy not to include platform-specific headers from our own
to avoid namespace pollution issues, in this case with names like "None" and "Window".
This commit is contained in:
Paul Cornett
2019-08-28 09:37:49 -07:00
parent 20b9964007
commit df450566dd
9 changed files with 74 additions and 93 deletions

View File

@@ -118,11 +118,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos,
{ WX_GL_RGBA, WX_GL_MIN_RED, 1, WX_GL_MIN_GREEN, 1,
WX_GL_MIN_BLUE, 1, WX_GL_DEPTH_SIZE, 1,
WX_GL_DOUBLEBUFFER,
# if defined(__WXMAC__) || defined(__WXQT__)
GL_NONE };
# else
None };
# endif
0 };
#endif
if (!g_doubleBuffer)
@@ -130,7 +126,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos,
wxLogWarning("Disabling double buffering");
#ifdef __WXGTK__
gl_attrib[9] = None;
gl_attrib[9] = 0;
#endif
g_doubleBuffer = GL_FALSE;
}