summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-09-05 13:46:56 +0200
committerLaszlo Agocs <laszlo.agocs@digia.com>2014-09-06 20:46:57 +0200
commit6d43b06d2b8f101f72d798d10e692fa134963849 (patch)
treef9534a67cab8313c98a5424318ab800957dfa226 /src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
parent73151fc07b78a52ee4887fa8325bc4e582320c73 (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/qwaylandglcontext.cpp')
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index a891e7682..b2db1ad0c 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -44,12 +44,14 @@
#include <QtWaylandClient/private/qwaylanddisplay_p.h>
#include <QtWaylandClient/private/qwaylandwindow_p.h>
#include <QtWaylandClient/private/qwaylanddecoration_p.h>
+#include <QtWaylandClient/private/qwaylandintegration_p.h>
#include "qwaylandeglwindow.h"
#include <QDebug>
#include <QtPlatformSupport/private/qeglconvenience_p.h>
#include <QtGui/private/qopenglcontext_p.h>
#include <QtGui/private/qopengltexturecache_p.h>
+#include <QtGui/private/qguiapplication_p.h>
#include <qpa/qplatformopenglcontext.h>
#include <QtGui/QSurfaceFormat>
@@ -60,11 +62,14 @@ QT_BEGIN_NAMESPACE
QWaylandGLContext::QWaylandGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformOpenGLContext *share)
: QPlatformOpenGLContext()
, m_eglDisplay(eglDisplay)
- , m_config(q_configFromGLFormat(m_eglDisplay, format))
- , m_format(q_glFormatFromConfig(m_eglDisplay, m_config))
, m_blitProgram(0)
, mUseNativeDefaultFbo(false)
{
+ QSurfaceFormat fmt = format;
+ if (static_cast<QWaylandIntegration *>(QGuiApplicationPrivate::platformIntegration())->display()->supportsWindowDecoration())
+ fmt.setAlphaBufferSize(8);
+ m_config = q_configFromGLFormat(m_eglDisplay, fmt);
+ m_format = q_glFormatFromConfig(m_eglDisplay, m_config);
m_shareEGLContext = share ? static_cast<QWaylandGLContext *>(share)->eglContext() : EGL_NO_CONTEXT;
switch (m_format.renderableType()) {