]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/glx11.cpp
fix for glib critical errors when closing an mdi child
[wxWidgets.git] / src / unix / glx11.cpp
index b0da747670380a5b69fe5da1225f9499c1792926..780029891d0de5e04b1e04e4a23a202935b105a4 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------