X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5ec69e9666e300c9ba210812a11ca5dc9111b5f9..f03789294fa0ff17144083c34704ea0ed434ee30:/src/unix/glx11.cpp diff --git a/src/unix/glx11.cpp b/src/unix/glx11.cpp index b0da747670..780029891d 100644 --- a/src/unix/glx11.cpp +++ b/src/unix/glx11.cpp @@ -297,6 +297,24 @@ wxGLCanvasX11::InitXVisualInfo(const int *attribList, return *pXVisual != NULL; } +/* static */ +bool +wxGLCanvasBase::IsDisplaySupported(const int *attribList) +{ + GLXFBConfig *fbc = NULL; + XVisualInfo *vi = NULL; + + const bool + isSupported = wxGLCanvasX11::InitXVisualInfo(attribList, &fbc, &vi); + + if ( fbc ) + XFree(fbc); + if ( vi ) + XFree(vi); + + return isSupported; +} + // ---------------------------------------------------------------------------- // default visual management // ----------------------------------------------------------------------------