Fixed XComposite hardware integration.
authorSamuel Rødal <samuel.rodal@nokia.com>
Wed, 14 Sep 2011 11:48:33 +0000 (13:48 +0200)
committerSamuel Rødal <samuel.rodal@nokia.com>
Wed, 14 Sep 2011 12:13:16 +0000 (14:13 +0200)
The root window needs to actually be mapped in order for
XCompositeNameWindowPixmap to work.

Also make sure to set both the window and pixmap bits in case we're on a
stricter EGL / GLX implementation.

src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp
src/qt-compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp
src/qt-compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp

index 59617c6..e32183a 100644 (file)
@@ -18,7 +18,7 @@ QVector<EGLint> eglbuildSpec()
 {
     QVector<EGLint> spec;
 
-    spec.append(EGL_SURFACE_TYPE); spec.append(EGL_PIXMAP_BIT);
+    spec.append(EGL_SURFACE_TYPE); spec.append(EGL_WINDOW_BIT | EGL_PIXMAP_BIT);
     spec.append(EGL_RENDERABLE_TYPE); spec.append(EGL_OPENGL_ES2_BIT);
     spec.append(EGL_BIND_TO_TEXTURE_RGBA); spec.append(EGL_TRUE);
     spec.append(EGL_ALPHA_SIZE); spec.append(8);
index f109414..17c68d1 100644 (file)
@@ -20,7 +20,7 @@ QVector<int> qglx_buildSpec()
 
     spec[i++] = GLX_LEVEL;
     spec[i++] = 0;
-    spec[i++] = GLX_DRAWABLE_TYPE; spec[i++] = GLX_PIXMAP_BIT;
+    spec[i++] = GLX_DRAWABLE_TYPE; spec[i++] = GLX_PIXMAP_BIT | GLX_WINDOW_BIT;
     spec[i++] = GLX_BIND_TO_TEXTURE_TARGETS_EXT; spec[i++] = GLX_TEXTURE_2D_BIT_EXT;
     spec[i++] = GLX_BIND_TO_TEXTURE_RGB_EXT; spec[i++] = TRUE;
 
index 4a64eb8..ef935e6 100644 (file)
@@ -12,6 +12,8 @@ XCompositeHandler::XCompositeHandler(Wayland::Compositor *compositor, Display *d
 {
     mFakeRootWidget = new QWindow(mCompositor->window());
     mFakeRootWidget->setGeometry(QRect(-1,-1,1,1));
+    mFakeRootWidget->create();
+    mFakeRootWidget->show();
     int composite_event_base, composite_error_base;
     if (XCompositeQueryExtension(mDisplay, &composite_event_base, &composite_error_base)) {