From e3aace811c9d53adf25853ef4e92681ecb983cc3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20R=C3=B8dal?= Date: Wed, 14 Sep 2011 13:48:33 +0200 Subject: [PATCH] Fixed XComposite hardware integration. 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. --- .../hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp | 2 +- .../hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp | 2 +- .../hardware_integration/xcomposite_share/xcompositehandler.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp b/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp index 59617c6..e32183a 100644 --- a/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp +++ b/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp @@ -18,7 +18,7 @@ QVector eglbuildSpec() { QVector 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); diff --git a/src/qt-compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp b/src/qt-compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp index f109414..17c68d1 100644 --- a/src/qt-compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp +++ b/src/qt-compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp @@ -20,7 +20,7 @@ QVector 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; diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp b/src/qt-compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp index 4a64eb8..ef935e6 100644 --- a/src/qt-compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp +++ b/src/qt-compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp @@ -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)) { -- 2.7.4