From 9ad274406a0f893f9a595aac7031deac2b25afbd Mon Sep 17 00:00:00 2001
From: Tom Cooksey <thomas.cooksey@nokia.com>
Date: Tue, 13 Apr 2010 12:40:35 +0200
Subject: Print more information when debugging X11 Visual selection

Reviewed-By: TrustMe
---
 src/gui/egl/qegl_x11.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp
index 5341ea1..cb8dcda 100644
--- a/src/gui/egl/qegl_x11.cpp
+++ b/src/gui/egl/qegl_x11.cpp
@@ -210,6 +210,11 @@ VisualID QEgl::getCompatibleVisualId(EGLConfig config)
         }
         XFree(chosenVisualInfo);
     }
+#ifdef QT_DEBUG_X11_VISUAL_SELECTION
+    else
+        qDebug("EGL did not suggest a VisualID (EGL_NATIVE_VISUAL_ID was zero) for EGLConfig %d", configId);
+#endif
+
     if (visualId) {
 #ifdef QT_DEBUG_X11_VISUAL_SELECTION
         if (configAlphaSize > 0)
@@ -263,6 +268,11 @@ VisualID QEgl::getCompatibleVisualId(EGLConfig config)
 # endif // QT_DEBUG_X11_VISUAL_SELECTION
         return visualId;
     }
+# ifdef QT_DEBUG_X11_VISUAL_SELECTION
+    else
+        qDebug("Failed to find an XVisual which matches EGL config %d using XRender", configId);
+# endif // QT_DEBUG_X11_VISUAL_SELECTION
+
 #endif //!defined(QT_NO_XRENDER)
 
 
-- 
cgit v0.12