Use requested window format to match rest of the patch in 38257651
authorTor Arne Vestbø <tor.arne.vestbo@nokia.com>
Tue, 21 Feb 2012 12:08:42 +0000 (13:08 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 21 Feb 2012 13:01:29 +0000 (14:01 +0100)
Otherwise we end up with an error at runtime:

  QEGLPlatformContext::makeCurrent: eglError: 3009, this: 0x4b5c58

Change-Id: I1e794f427243e40f0a8f572a936b9fb756e89f8a
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/plugins/platforms/xcb/qxcbwindow.cpp

index be3d527..43e4a6b 100644 (file)
@@ -1179,7 +1179,7 @@ QXcbEGLSurface *QXcbWindow::eglSurface() const
 {
     if (!m_eglSurface) {
         EGLDisplay display = connection()->egl_display();
-        EGLConfig config = q_configFromGLFormat(display, window()->format(), true);
+        EGLConfig config = q_configFromGLFormat(display, window()->requestedFormat(), true);
         EGLSurface surface = eglCreateWindowSurface(display, config, (EGLNativeWindowType)m_window, 0);
 
         m_eglSurface = new QXcbEGLSurface(display, surface);