diff options
author | Samuel Rødal <samuel.rodal@nokia.com> | 2011-08-05 12:11:40 +0200 |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-08-05 16:34:35 +0200 |
commit | ca1ad7e9a56959ee8946eef1ade30d00755eac67 (patch) | |
tree | 80ae3a77fcfb2fa85a65862afded2fb06a246fbe /src/plugins/platforms/wayland/qwaylandintegration.cpp | |
parent | 6b728caee4c53643e7ee2f60ffa8329719ad9e30 (diff) |
Get wayland plugin working after latest QPA API changes.
Change-Id: If54e7068aaed84fe765b887250bca79c787bd8a3
Reviewed-on: http://codereview.qt.nokia.com/2684
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandintegration.cpp')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandintegration.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index eb4503c829..eefd86dbf1 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -56,6 +56,7 @@ #include <QtGui/QWindowSystemInterface> #include <QtGui/QPlatformCursor> #include <QtGui/QSurfaceFormat> +#include <QtGui/QGuiGLContext> #ifdef QT_WAYLAND_GL_SUPPORT #include "gl_integration/qwaylandglintegration.h" @@ -68,6 +69,9 @@ QWaylandIntegration::QWaylandIntegration() { QGuiApplicationPrivate::instance()->setEventDispatcher(mEventDispatcher); mDisplay = new QWaylandDisplay(); + + foreach (QPlatformScreen *screen, mDisplay->screens()) + screenAdded(screen); } QPlatformNativeInterface * QWaylandIntegration::nativeInterface() const @@ -75,12 +79,6 @@ QPlatformNativeInterface * QWaylandIntegration::nativeInterface() const return mNativeInterface; } -QList<QPlatformScreen *> -QWaylandIntegration::screens() const -{ - return mDisplay->screens(); -} - bool QWaylandIntegration::hasCapability(QPlatformIntegration::Capability cap) const { switch (cap) { @@ -104,10 +102,10 @@ QPlatformWindow *QWaylandIntegration::createPlatformWindow(QWindow *window) cons return new QWaylandShmWindow(window); } -QPlatformGLContext *QWaylandIntegration::createPlatformGLContext(const QSurfaceFormat &glFormat, QPlatformGLContext *share) const +QPlatformGLContext *QWaylandIntegration::createPlatformGLContext(QGuiGLContext *context) const { #ifdef QT_WAYLAND_GL_SUPPORT - return mDisplay->eglIntegration()->createPlatformGLContext(glFormat, share); + return mDisplay->eglIntegration()->createPlatformGLContext(context->format(), context->shareHandle()); #else Q_UNUSED(glFormat); Q_UNUSED(share); |