diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-09-05 13:46:56 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@digia.com> | 2014-09-06 20:46:57 +0200 |
commit | 6d43b06d2b8f101f72d798d10e692fa134963849 (patch) | |
tree | f9534a67cab8313c98a5424318ab800957dfa226 /src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp | |
parent | 73151fc07b78a52ee4887fa8325bc4e582320c73 (diff) |
Fix window decorations for GL apps
You cannot have rounded corners with an alpha-less config. To make OpenGL
applications appearing with the correct decoration, alpha must be enabled.
With this fix the OpenGL apps' decoration will now look identical to the
SHM apps'.
Change-Id: I24431ddab63146f7f697c85277f00f41e5c55e85
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
Diffstat (limited to 'src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp')
-rw-r--r-- | src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp index a9247d4a1..5feed543c 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp @@ -59,11 +59,15 @@ QWaylandEglWindow::QWaylandEglWindow(QWindow *window) , m_clientBufferIntegration(static_cast<QWaylandEglClientBufferIntegration *>(mDisplay->clientBufferIntegration())) , m_waylandEglWindow(0) , m_eglSurface(0) - , m_eglConfig(q_configFromGLFormat(m_clientBufferIntegration->eglDisplay(), window->requestedFormat())) , m_contentFBO(0) , m_resize(false) - , m_format(q_glFormatFromConfig(m_clientBufferIntegration->eglDisplay(), m_eglConfig)) { + QSurfaceFormat fmt = window->requestedFormat(); + if (mDisplay->supportsWindowDecoration()) + fmt.setAlphaBufferSize(8); + m_eglConfig = q_configFromGLFormat(m_clientBufferIntegration->eglDisplay(), fmt); + m_format = q_glFormatFromConfig(m_clientBufferIntegration->eglDisplay(), m_eglConfig); + // Do not create anything from here. This platform window may belong to a // RasterGLSurface window which may have pure raster content. In this case, where the // window is never actually made current, creating a wl_egl_window and EGL surface |