summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.qmake.conf2
-rw-r--r--README2
-rw-r--r--config.tests/wayland/main.cpp18
-rw-r--r--config.tests/wayland_cursor/main.cpp48
-rw-r--r--config.tests/wayland_cursor/wayland_cursor.pro12
-rw-r--r--examples/server-buffer/client/main.cpp2
-rw-r--r--examples/server-buffer/client/serverbufferrenderer.cpp6
-rw-r--r--examples/server-buffer/compositor/main.cpp31
-rw-r--r--examples/server-buffer/compositor/serverbufferitem.cpp6
-rw-r--r--examples/server-buffer/compositor/serverbufferitem.h13
-rw-r--r--qtwayland.pro12
-rw-r--r--src/3rdparty/patches/0001-Add-a-EGL_DRM_BUFFER_FORMAT_A8_MESA-10.patch87
-rw-r--r--src/3rdparty/patches/0001-Add-a-EGL_DRM_BUFFER_FORMAT_A8_MESA-9.2.patch (renamed from src/3rdparty/patches/0001-Add-a-EGL_DRM_BUFFER_FORMAT_A8_MESA.patch)0
-rw-r--r--src/3rdparty/protocol/wayland.xml252
-rw-r--r--src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h2
-rw-r--r--src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h2
-rw-r--r--src/client/qwaylandintegration.cpp9
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.cpp2
-rw-r--r--src/compositor/compositor_api/qwaylandsurfaceitem.cpp21
-rw-r--r--src/compositor/hardware_integration/hardware_integration.pri24
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegration.cpp (renamed from src/compositor/hardware_integration/qwaylandclientbufferintegration.cpp)8
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegration_p.h (renamed from src/compositor/hardware_integration/qwaylandclientbufferintegration.h)17
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp (renamed from src/compositor/hardware_integration/qwaylandserverbufferintegrationfactory.cpp)22
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegrationfactory_p.h (renamed from src/compositor/hardware_integration/qwaylandclientbufferintegrationfactory.h)10
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegrationplugin.cpp (renamed from src/compositor/hardware_integration/qwaylandserverbufferintegrationplugin.cpp)11
-rw-r--r--src/compositor/hardware_integration/qwlclientbufferintegrationplugin_p.h (renamed from src/compositor/hardware_integration/qwaylandclientbufferintegrationplugin.h)16
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegration.cpp (renamed from src/compositor/hardware_integration/qwaylandserverbufferintegration.cpp)22
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegration_p.h (renamed from src/compositor/hardware_integration/qwaylandserverbufferintegration.h)21
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp (renamed from src/compositor/hardware_integration/qwaylandclientbufferintegrationfactory.cpp)22
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegrationfactory_p.h (renamed from src/compositor/hardware_integration/qwaylandserverbufferintegrationfactory.h)10
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegrationplugin.cpp (renamed from src/compositor/hardware_integration/qwaylandclientbufferintegrationplugin.cpp)11
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegrationplugin_p.h (renamed from src/compositor/hardware_integration/qwaylandserverbufferintegrationplugin.h)16
-rw-r--r--src/compositor/wayland_wrapper/qwlcompositor.cpp101
-rw-r--r--src/compositor/wayland_wrapper/qwlcompositor_p.h13
-rw-r--r--src/compositor/wayland_wrapper/qwldatadevicemanager.cpp3
-rw-r--r--src/compositor/wayland_wrapper/qwlshellsurface.cpp3
-rw-r--r--src/compositor/wayland_wrapper/qwlsubsurface.cpp19
-rw-r--r--src/compositor/wayland_wrapper/qwlsurface.cpp8
-rw-r--r--src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp12
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp1
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp1
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h2
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp15
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h2
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp1
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h2
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp2
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h4
-rw-r--r--src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp12
-rw-r--r--src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h12
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp4
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h4
-rw-r--r--src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp2
-rw-r--r--src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h4
-rw-r--r--src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp2
-rw-r--r--src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h4
-rw-r--r--src/plugins/hardwareintegration/client/brcm-egl/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/drm-egl-server/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/wayland-egl/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp10
-rw-r--r--src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp10
-rw-r--r--src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp12
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp10
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp10
-rw-r--r--src/qtwaylandscanner/qtwaylandscanner.cpp6
-rw-r--r--tests/auto/auto.pro2
69 files changed, 728 insertions, 313 deletions
diff --git a/.gitignore b/.gitignore
index d78d691a3..0aac8cc7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,6 +9,7 @@ Makefile*
config.log
config.tests/egl/egl
config.tests/glx/glx
+config.tests/wayland_cursor/wayland_cursor
config.tests/wayland_egl/wayland_egl
config.tests/xcomposite/xcomposite
config.tests/xkbcommon/xkbcommon
diff --git a/.qmake.conf b/.qmake.conf
index 45d05b259..16328b7d6 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -1,3 +1,3 @@
load(qt_build_config)
-MODULE_VERSION = 5.2.1
+MODULE_VERSION = 5.3.0
diff --git a/README b/README
index 5fe0d5ab7..dcfb09ce9 100644
--- a/README
+++ b/README
@@ -17,7 +17,7 @@ make
To build the QtWayland module you need the external dependencies:
xkbcommon 0.2.0 - http://xkbcommon.org/
-wayland 1.1.0 - http://wayland.freedesktop.org/
+wayland 1.3.0 - http://wayland.freedesktop.org/
We hang out at #qt-labs and #qt-lighthouse on freenode if you have any questions
diff --git a/config.tests/wayland/main.cpp b/config.tests/wayland/main.cpp
index de4e9edbb..fb9915305 100644
--- a/config.tests/wayland/main.cpp
+++ b/config.tests/wayland/main.cpp
@@ -43,15 +43,17 @@
int main()
{
#if WAYLAND_VERSION_MAJOR < 1
-# error Wayland 1.1.0 or higher required
+# error Wayland 1.3.0 or higher required
#endif
-#if WAYLAND_VERSION_MINOR < 1
-# error Wayland 1.1.0 or higher required
-#endif
-#if WAYLAND_VERSION_MINOR < 2
-//# if WAYLAND_VERSION_MICRO < 0
-//# error Wayland 1.1.0 or higher required
-//# endif
+#if WAYLAND_VERSION_MAJOR == 1
+# if WAYLAND_VERSION_MINOR < 3
+# error Wayland 1.3.0 or higher required
+# endif
+# if WAYLAND_VERSION_MINOR == 3
+# if WAYLAND_VERSION_MICRO < 0
+# error Wayland 1.3.0 or higher required
+# endif
# endif
+#endif
return 0;
}
diff --git a/config.tests/wayland_cursor/main.cpp b/config.tests/wayland_cursor/main.cpp
new file mode 100644
index 000000000..299e2e3b2
--- /dev/null
+++ b/config.tests/wayland_cursor/main.cpp
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Compositor.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+** of its contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <wayland-cursor.h>
+
+int main()
+{
+ struct wl_cursor_image *image = 0;
+
+ return 0;
+}
diff --git a/config.tests/wayland_cursor/wayland_cursor.pro b/config.tests/wayland_cursor/wayland_cursor.pro
new file mode 100644
index 000000000..aa38d32fb
--- /dev/null
+++ b/config.tests/wayland_cursor/wayland_cursor.pro
@@ -0,0 +1,12 @@
+TARGET = wayland_cursor
+QT = core
+
+!contains(QT_CONFIG, no-pkg-config) {
+ CONFIG += link_pkgconfig
+ PKGCONFIG += wayland-cursor
+} else {
+ LIBS += -lwayland-cursor
+}
+
+# Input
+SOURCES += main.cpp
diff --git a/examples/server-buffer/client/main.cpp b/examples/server-buffer/client/main.cpp
index b5ce8aec3..1880f2160 100644
--- a/examples/server-buffer/client/main.cpp
+++ b/examples/server-buffer/client/main.cpp
@@ -128,7 +128,7 @@ public slots:
const QSizeF buffer_size = m_server_buffer_list.at(i)->size();
qreal scale_x = buffer_size.width() / width();
- qreal scale_y = buffer_size.height() / height();
+ qreal scale_y = buffer_size.height() / height() * - 1;
qreal translate_left = (((buffer_size.width() / 2) / width()) * 2) - 1;
qreal translate_top = -(((buffer_size.height() / 2) / height()) * 2) + 1;
qreal translate_x = translate_left + ((x / width())*2);
diff --git a/examples/server-buffer/client/serverbufferrenderer.cpp b/examples/server-buffer/client/serverbufferrenderer.cpp
index b9aa7a018..9eafddd63 100644
--- a/examples/server-buffer/client/serverbufferrenderer.cpp
+++ b/examples/server-buffer/client/serverbufferrenderer.cpp
@@ -43,10 +43,10 @@
#include <QtGui/QOpenGLVertexArrayObject>
#include <QtGui/QOpenGLShaderProgram>
static const GLfloat uv_coords[] = {
- 1,1,
- 1,0,
- 0,1,
0,0,
+ 0,1,
+ 1,0,
+ 1,1,
};
static const GLfloat vertex_coords[] = {
diff --git a/examples/server-buffer/compositor/main.cpp b/examples/server-buffer/compositor/main.cpp
index bf93c4838..23e337d24 100644
--- a/examples/server-buffer/compositor/main.cpp
+++ b/examples/server-buffer/compositor/main.cpp
@@ -55,7 +55,7 @@
#include "qwayland-server-share-buffer.h"
#include <QtCompositor/private/qwlcompositor_p.h>
-#include <QtCompositor/qwaylandserverbufferintegration.h>
+#include <QtCompositor/private/qwlserverbufferintegration_p.h>
#include "serverbufferitem.h"
@@ -111,14 +111,7 @@ public slots:
private slots:
void surfaceMapped() {
QWaylandSurface *surface = qobject_cast<QWaylandSurface *>(sender());
-
- QWaylandSurfaceItem *item = surface->surfaceItem();
- if (!item) {
- item = new QWaylandSurfaceItem(surface, rootObject());
- item->setUseTextureAlpha(true);
- }
-
- item->setTouchEventsEnabled(true);
+ QQuickItem *item = surface->surfaceItem();
emit windowAdded(QVariant::fromValue(static_cast<QQuickItem *>(item)));
}
@@ -145,12 +138,12 @@ private slots:
openglContext()->makeCurrent(this);
- QWaylandServerBufferIntegration *sbi = QWaylandCompositor::handle()->serverBufferIntegration();
+ QtWayland::ServerBufferIntegration *sbi = QWaylandCompositor::handle()->serverBufferIntegration();
if (!sbi) {
qWarning("Could not find a Server Buffer Integration");
return;
}
- if (sbi->supportsFormat(QWaylandServerBuffer::RGBA32)) {
+ if (sbi->supportsFormat(QtWayland::ServerBuffer::RGBA32)) {
QImage image(100,100,QImage::Format_ARGB32_Premultiplied);
image.fill(QColor(0x55,0x0,0x55,0x01));
{
@@ -169,7 +162,7 @@ private slots:
}
image = image.convertToFormat(QImage::Format_RGBA8888);
- m_server_buffer_32_bit = sbi->createServerBuffer(image.size(),QWaylandServerBuffer::RGBA32);
+ m_server_buffer_32_bit = sbi->createServerBuffer(image.size(),QtWayland::ServerBuffer::RGBA32);
GLuint texture_32_bit;
glGenTextures(1, &texture_32_bit);
@@ -183,13 +176,13 @@ private slots:
}
- if (sbi->supportsFormat(QWaylandServerBuffer::A8)) {
+ if (sbi->supportsFormat(QtWayland::ServerBuffer::A8)) {
QRawFont defaultRaw = QRawFont::fromFont(QFont(), QFontDatabase::Latin);
- QVector<quint32> index = defaultRaw.glyphIndexesForString(QStringLiteral("A"));
+ QVector<quint32> index = defaultRaw.glyphIndexesForString(QStringLiteral("R"));
QDistanceField distanceField(defaultRaw, index.front(), true);
QImage img = distanceField.toImage(QImage::Format_Indexed8);
- m_server_buffer_8_bit = sbi->createServerBuffer(img.size(), QWaylandServerBuffer::A8);
+ m_server_buffer_8_bit = sbi->createServerBuffer(img.size(), QtWayland::ServerBuffer::A8);
GLuint texture_8_bit;
glGenTextures(1, &texture_8_bit);
glBindTexture(GL_TEXTURE_2D, texture_8_bit);
@@ -221,6 +214,10 @@ protected:
}
void surfaceCreated(QWaylandSurface *surface) {
+ QWaylandSurfaceItem *item = new QWaylandSurfaceItem(surface, rootObject());
+ item->setUseTextureAlpha(true);
+ item->setTouchEventsEnabled(true);
+
connect(surface, SIGNAL(destroyed(QObject *)), this, SLOT(surfaceDestroyed(QObject *)));
connect(surface, SIGNAL(mapped()), this, SLOT(surfaceMapped()));
connect(surface,SIGNAL(unmapped()), this,SLOT(surfaceUnmapped()));
@@ -243,9 +240,9 @@ protected:
}
private:
- QWaylandServerBuffer *m_server_buffer_32_bit;
+ QtWayland::ServerBuffer *m_server_buffer_32_bit;
ServerBufferItem *m_server_buffer_item_32_bit;
- QWaylandServerBuffer *m_server_buffer_8_bit;
+ QtWayland::ServerBuffer *m_server_buffer_8_bit;
ServerBufferItem *m_server_buffer_item_8_bit;
};
diff --git a/examples/server-buffer/compositor/serverbufferitem.cpp b/examples/server-buffer/compositor/serverbufferitem.cpp
index 8227b8716..4a47c279d 100644
--- a/examples/server-buffer/compositor/serverbufferitem.cpp
+++ b/examples/server-buffer/compositor/serverbufferitem.cpp
@@ -45,11 +45,11 @@
#include <QtQuick/QSGSimpleTextureNode>
#include <QtQuick/QQuickWindow>
-#include <QtCompositor/qwaylandserverbufferintegration.h>
+#include <QtCompositor/private/qwlserverbufferintegration_p.h>
QT_BEGIN_NAMESPACE
-ServerBufferItem::ServerBufferItem(QWaylandServerBuffer *serverBuffer, QQuickItem *parent)
+ServerBufferItem::ServerBufferItem(QtWayland::ServerBuffer *serverBuffer, QQuickItem *parent)
: QQuickItem(parent)
, m_server_buffer(serverBuffer)
, m_provider(new ServerBufferTextureProvider)
@@ -72,7 +72,7 @@ bool ServerBufferItem::isYInverted() const
int ServerBufferItem::depth() const
{
- return m_server_buffer->format() == QWaylandServerBuffer::RGBA32 ? 32 : 8;
+ return m_server_buffer->format() == QtWayland::ServerBuffer::RGBA32 ? 32 : 8;
}
QSGTextureProvider *ServerBufferItem::textureProvider() const
diff --git a/examples/server-buffer/compositor/serverbufferitem.h b/examples/server-buffer/compositor/serverbufferitem.h
index 9391cb942..31fad4e86 100644
--- a/examples/server-buffer/compositor/serverbufferitem.h
+++ b/examples/server-buffer/compositor/serverbufferitem.h
@@ -49,21 +49,24 @@
QT_BEGIN_NAMESPACE
class ServerBufferTextureProvider;
-class QWaylandServerBuffer;
+
+namespace QtWayland {
+class ServerBuffer;
+}
class ServerBufferItem : public QQuickItem
{
Q_OBJECT
- Q_PROPERTY(QWaylandServerBuffer *serverBuffer READ serverBuffer CONSTANT)
+ Q_PROPERTY(QtWayland::ServerBuffer *serverBuffer READ serverBuffer CONSTANT)
Q_PROPERTY(bool useTextureAlpha READ useTextureAlpha WRITE setUseTextureAlpha NOTIFY useTextureAlphaChanged)
Q_PROPERTY(bool isYInverted READ isYInverted NOTIFY yInvertedChanged)
Q_PROPERTY(int depth READ depth CONSTANT)
public:
- ServerBufferItem(QWaylandServerBuffer *serverBuffer, QQuickItem *parent = 0);
+ ServerBufferItem(QtWayland::ServerBuffer *serverBuffer, QQuickItem *parent = 0);
~ServerBufferItem();
- QWaylandServerBuffer *serverBuffer() const { return m_server_buffer; }
+ QtWayland::ServerBuffer *serverBuffer() const { return m_server_buffer; }
bool isYInverted() const;
int depth() const;
@@ -86,7 +89,7 @@ protected:
private:
void updateTexture();
- QWaylandServerBuffer *m_server_buffer;
+ QtWayland::ServerBuffer *m_server_buffer;
ServerBufferTextureProvider *m_provider;
bool m_useTextureAlpha;
};
diff --git a/qtwayland.pro b/qtwayland.pro
index 3a374a1cf..d6971baae 100644
--- a/qtwayland.pro
+++ b/qtwayland.pro
@@ -1,6 +1,7 @@
load(configure)
qtCompileTest(wayland)
qtCompileTest(xkbcommon)
+qtCompileTest(wayland_cursor)
qtCompileTest(wayland_scanner)
qtCompileTest(wayland_egl)
qtCompileTest(egl)
@@ -12,7 +13,8 @@ qtCompileTest(drm_egl_server)
load(qt_parts)
!config_wayland {
- error(QtWayland requires Wayland 1.1.0 or higher)
+ warning("QtWayland requires Wayland 1.1.0 or higher")
+ SUBDIRS =
}
!config_xkbcommon {
@@ -20,7 +22,13 @@ load(qt_parts)
}
!config_wayland_scanner {
- error(QtWayland requires wayland-scanner)
+ warning("QtWayland requires wayland-scanner")
+ SUBDIRS =
+}
+
+!config_wayland_cursor {
+ warning("QtWayland requires wayland-cursor")
+ SUBDIRS =
}
!config_wayland_egl {
diff --git a/src/3rdparty/patches/0001-Add-a-EGL_DRM_BUFFER_FORMAT_A8_MESA-10.patch b/src/3rdparty/patches/0001-Add-a-EGL_DRM_BUFFER_FORMAT_A8_MESA-10.patch
new file mode 100644
index 000000000..035822961
--- /dev/null
+++ b/src/3rdparty/patches/0001-Add-a-EGL_DRM_BUFFER_FORMAT_A8_MESA-10.patch
@@ -0,0 +1,87 @@
+From be72a2ae7d14e57c423ce0885b153abf56eefca4 Mon Sep 17 00:00:00 2001
+From: Jorgen Lind <jorgen.lind@digia.com>
+Date: Thu, 2 Jan 2014 12:28:54 +0100
+Subject: [PATCH] Add a EGL_DRM_BUFFER_FORMAT_A8_MESA
+
+This is to allow us to share A8 DRM buffers between processes
+---
+ include/EGL/eglext.h | 1 +
+ include/GL/internal/dri_interface.h | 1 +
+ src/egl/drivers/dri2/egl_dri2.c | 7 +++++++
+ src/mesa/drivers/dri/common/dri_util.c | 4 ++++
+ 4 files changed, 13 insertions(+)
+
+diff --git a/include/EGL/eglext.h b/include/EGL/eglext.h
+index 1d68178..6c4fb7e 100644
+--- a/include/EGL/eglext.h
++++ b/include/EGL/eglext.h
+@@ -271,6 +271,7 @@ typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dp
+ #define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* CreateDRMImageMESA attribute */
+ #define EGL_DRM_BUFFER_USE_MESA 0x31D1 /* CreateDRMImageMESA attribute */
+ #define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 /* EGL_IMAGE_FORMAT_MESA attribute value */
++#define EGL_DRM_BUFFER_FORMAT_A8_MESA 0x31D5 /* EGL_IMAGE_FORMAT_MESA attribute value */
+ #define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */
+ #define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4
+ #define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 /* EGL_DRM_BUFFER_USE_MESA bits */
+diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
+index b012570..c0ba605 100644
+--- a/include/GL/internal/dri_interface.h
++++ b/include/GL/internal/dri_interface.h
+@@ -1015,6 +1015,7 @@ struct __DRIdri2ExtensionRec {
+ #define __DRI_IMAGE_FORMAT_XRGB2101010 0x1009
+ #define __DRI_IMAGE_FORMAT_ARGB2101010 0x100a
+ #define __DRI_IMAGE_FORMAT_SARGB8 0x100b
++#define __DRI_IMAGE_FORMAT_A8 0x100c
+
+ #define __DRI_IMAGE_USE_SHARE 0x0001
+ #define __DRI_IMAGE_USE_SCANOUT 0x0002
+diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
+index a64f4e8..a8253e1 100644
+--- a/src/egl/drivers/dri2/egl_dri2.c
++++ b/src/egl/drivers/dri2/egl_dri2.c
+@@ -1185,6 +1185,10 @@ dri2_create_image_mesa_drm_buffer(_EGLDisplay *disp, _EGLContext *ctx,
+ format = __DRI_IMAGE_FORMAT_ARGB8888;
+ pitch = attrs.DRMBufferStrideMESA;
+ break;
++ case EGL_DRM_BUFFER_FORMAT_A8_MESA:
++ format = __DRI_IMAGE_FORMAT_A8;
++ pitch = attrs.DRMBufferStrideMESA;
++ break;
+ default:
+ _eglError(EGL_BAD_PARAMETER,
+ "dri2_create_image_khr: unsupported pixmap depth");
+@@ -1719,6 +1723,9 @@ dri2_create_drm_image_mesa(_EGLDriver *drv, _EGLDisplay *disp,
+ case EGL_DRM_BUFFER_FORMAT_ARGB32_MESA:
+ format = __DRI_IMAGE_FORMAT_ARGB8888;
+ break;
++ case EGL_DRM_BUFFER_FORMAT_A8_MESA:
++ format = __DRI_IMAGE_FORMAT_A8;
++ break;
+ default:
+ _eglLog(_EGL_WARNING, "bad image format value 0x%04x",
+ attrs.DRMBufferFormatMESA);
+diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
+index 9134a94..5fb55a2 100644
+--- a/src/mesa/drivers/dri/common/dri_util.c
++++ b/src/mesa/drivers/dri/common/dri_util.c
+@@ -831,6 +831,8 @@ driGLFormatToImageFormat(gl_format format)
+ return __DRI_IMAGE_FORMAT_NONE;
+ case MESA_FORMAT_SARGB8:
+ return __DRI_IMAGE_FORMAT_SARGB8;
++ case MESA_FORMAT_A8:
++ return __DRI_IMAGE_FORMAT_A8;
+ default:
+ return 0;
+ }
+@@ -860,6 +862,8 @@ driImageFormatToGLFormat(uint32_t image_format)
+ return MESA_FORMAT_GR88;
+ case __DRI_IMAGE_FORMAT_SARGB8:
+ return MESA_FORMAT_SARGB8;
++ case __DRI_IMAGE_FORMAT_A8:
++ return MESA_FORMAT_A8;
+ case __DRI_IMAGE_FORMAT_NONE:
+ return MESA_FORMAT_NONE;
+ default:
+--
+1.8.5.2
+
diff --git a/src/3rdparty/patches/0001-Add-a-EGL_DRM_BUFFER_FORMAT_A8_MESA.patch b/src/3rdparty/patches/0001-Add-a-EGL_DRM_BUFFER_FORMAT_A8_MESA-9.2.patch
index 46fac7144..46fac7144 100644
--- a/src/3rdparty/patches/0001-Add-a-EGL_DRM_BUFFER_FORMAT_A8_MESA.patch
+++ b/src/3rdparty/patches/0001-Add-a-EGL_DRM_BUFFER_FORMAT_A8_MESA-9.2.patch
diff --git a/src/3rdparty/protocol/wayland.xml b/src/3rdparty/protocol/wayland.xml
index 3bce022c3..a1df007d0 100644
--- a/src/3rdparty/protocol/wayland.xml
+++ b/src/3rdparty/protocol/wayland.xml
@@ -38,7 +38,7 @@
The sync request asks the server to emit the 'done' event
on the returned wl_callback object. Since requests are
handled in-order and events are delivered in-order, this can
- used as a barrier to ensure all previous requests and the
+ be used as a barrier to ensure all previous requests and the
resulting events have been handled.
The object returned by this request will be destroyed by the
@@ -173,7 +173,7 @@
</event>
</interface>
- <interface name="wl_compositor" version="2">
+ <interface name="wl_compositor" version="3">
<description summary="the compositor singleton">
A compositor. This object is a singleton global. The
compositor is in charge of combining the contents of multiple
@@ -274,10 +274,73 @@
<enum name="format">
<description summary="pixel formats">
- This describes the memory layout of an individual pixel.
+ This describes the memory layout of an individual pixel.
+
+ All renderers should support argb8888 and xrgb8888 but any other
+ formats are optional and may not be supported by the particular
+ renderer in use.
</description>
<entry name="argb8888" value="0" summary="32-bit ARGB format"/>
<entry name="xrgb8888" value="1" summary="32-bit RGB format"/>
+ <!-- The drm format codes match the #defines in drm_fourcc.h.
+ The formats actually supported by the compositor will be
+ reported by the format event. -->
+ <entry name="c8" value="0x20203843"/>
+ <entry name="rgb332" value="0x38424752"/>
+ <entry name="bgr233" value="0x38524742"/>
+ <entry name="xrgb4444" value="0x32315258"/>
+ <entry name="xbgr4444" value="0x32314258"/>
+ <entry name="rgbx4444" value="0x32315852"/>
+ <entry name="bgrx4444" value="0x32315842"/>
+ <entry name="argb4444" value="0x32315241"/>
+ <entry name="abgr4444" value="0x32314241"/>
+ <entry name="rgba4444" value="0x32314152"/>
+ <entry name="bgra4444" value="0x32314142"/>
+ <entry name="xrgb1555" value="0x35315258"/>
+ <entry name="xbgr1555" value="0x35314258"/>
+ <entry name="rgbx5551" value="0x35315852"/>
+ <entry name="bgrx5551" value="0x35315842"/>
+ <entry name="argb1555" value="0x35315241"/>
+ <entry name="abgr1555" value="0x35314241"/>
+ <entry name="rgba5551" value="0x35314152"/>
+ <entry name="bgra5551" value="0x35314142"/>
+ <entry name="rgb565" value="0x36314752"/>
+ <entry name="bgr565" value="0x36314742"/>
+ <entry name="rgb888" value="0x34324752"/>
+ <entry name="bgr888" value="0x34324742"/>
+ <entry name="xbgr8888" value="0x34324258"/>
+ <entry name="rgbx8888" value="0x34325852"/>
+ <entry name="bgrx8888" value="0x34325842"/>
+ <entry name="abgr8888" value="0x34324241"/>
+ <entry name="rgba8888" value="0x34324152"/>
+ <entry name="bgra8888" value="0x34324142"/>
+ <entry name="xrgb2101010" value="0x30335258"/>
+ <entry name="xbgr2101010" value="0x30334258"/>
+ <entry name="rgbx1010102" value="0x30335852"/>
+ <entry name="bgrx1010102" value="0x30335842"/>
+ <entry name="argb2101010" value="0x30335241"/>
+ <entry name="abgr2101010" value="0x30334241"/>
+ <entry name="rgba1010102" value="0x30334152"/>
+ <entry name="bgra1010102" value="0x30334142"/>
+ <entry name="yuyv" value="0x56595559"/>
+ <entry name="yvyu" value="0x55595659"/>
+ <entry name="uyvy" value="0x59565955"/>
+ <entry name="vyuy" value="0x59555956"/>
+ <entry name="ayuv" value="0x56555941"/>
+ <entry name="nv12" value="0x3231564e"/>
+ <entry name="nv21" value="0x3132564e"/>
+ <entry name="nv16" value="0x3631564e"/>
+ <entry name="nv61" value="0x3136564e"/>
+ <entry name="yuv410" value="0x39565559"/>
+ <entry name="yvu410" value="0x39555659"/>
+ <entry name="yuv411" value="0x31315559"/>
+ <entry name="yvu411" value="0x31315659"/>
+ <entry name="yuv420" value="0x32315559"/>
+ <entry name="yvu420" value="0x32315659"/>
+ <entry name="yuv422" value="0x36315559"/>
+ <entry name="yvu422" value="0x36315659"/>
+ <entry name="yuv444" value="0x34325559"/>
+ <entry name="yvu444" value="0x34325659"/>
</enum>
<request name="create_pool">
@@ -521,7 +584,7 @@
<description summary="initiate drag-and-drop session">
This event is sent when an active drag-and-drop pointer enters
a surface owned by the client. The position of the pointer at
- enter time is provided by the x an y arguments, in surface
+ enter time is provided by the x and y arguments, in surface
local coordinates.
</description>
@@ -544,7 +607,7 @@
<description summary="drag-and-drop session motion">
This event is sent when the drag-and-drop pointer moves within
the currently focused surface. The new position of the pointer
- is provided by the x an y arguments, in surface local
+ is provided by the x and y arguments, in surface local
coordinates.
</description>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>
@@ -577,7 +640,7 @@
<interface name="wl_data_device_manager" version="1">
<description summary="data transfer interface">
- The wl_data_device_manager is a a singleton global object that
+ The wl_data_device_manager is a singleton global object that
provides access to inter-client data transfer mechanisms such as
copy-and-paste and drag-and-drop. These mechanisms are tied to
a wl_seat and this interface lets a client get a wl_data_device
@@ -709,7 +772,7 @@
The x and y arguments specify the locations of the upper left
corner of the surface relative to the upper left corner of the
- parent surface.
+ parent surface, in surface local coordinates.
The flags argument controls details of the transient behaviour.
</description>
@@ -729,7 +792,7 @@
<entry name="default" value="0" summary="no preference, apply default policy"/>
<entry name="scale" value="1" summary="scale, preserve the surface's aspect ratio and center on output"/>
<entry name="driver" value="2" summary="switch output mode to the smallest mode that can fit the surface, add black borders to compensate size mismatch"/>
- <entry name="fill" value="3" summary="no scaling, center on output and add black borders to compensate size mismatch"/>
+ <entry name="fill" value="3" summary="no upscaling, center on output and add black borders to compensate size mismatch"/>
</enum>
<request name="set_fullscreen">
@@ -751,6 +814,19 @@
indicates that the app does not care about framerate. The
framerate is specified in mHz, that is framerate of 60000 is 60Hz.
+ A method of "scale" or "driver" implies a scaling operation of
+ the surface, either via a direct scaling operation or a change of
+ the output mode. This will override any kind of output scaling, so
+ that mapping a surface with a buffer size equal to the mode can
+ fill the screen independent of buffer_scale.
+
+ A method of "fill" means we don't scale up the buffer, however
+ any output scale is applied. This means that you may run into
+ an edge case where the application maps a buffer with the same
+ size of the output mode but buffer_scale 1 (thus making a
+ surface larger than the output). In this case it is allowed to
+ downscale the results to fit the screen.
+
The compositor must reply to this request with a configure event
with the dimensions for the output on which the surface will
be made fullscreen.
@@ -777,6 +853,10 @@
in any of the clients surfaces is reported as normal, however,
clicks in other clients surfaces will be discarded and trigger
the callback.
+
+ The x and y arguments specify the locations of the upper left
+ corner of the surface relative to the upper left corner of the
+ parent surface, in surface local coordinates.
</description>
<arg name="seat" type="object" interface="wl_seat" summary="the wl_seat whose pointer is used"/>
@@ -829,9 +909,9 @@
Set a class for the surface.
The surface class identifies the general class of applications
- to which the surface belongs. A common convention is to use
- the file name (full path if non-standard location) of the
- applications .desktop file as the class.
+ to which the surface belongs. A common convention is to use the
+ file name (or the full path if it is a non-standard location) of
+ the application's .desktop file as the class.
</description>
<arg name="class_" type="string"/>
</request>
@@ -860,6 +940,9 @@
The client is free to dismiss all but the last configure
event it received.
+
+ The width and height arguments specify the size of the window
+ in surface local coordinates.
</description>
<arg name="edges" type="uint"/>
@@ -870,17 +953,22 @@
<event name="popup_done">
<description summary="popup interaction is done">
The popup_done event is sent out when a popup grab is broken,
- that is, when the users clicks a surface that doesn't belong
+ that is, when the user clicks a surface that doesn't belong
to the client owning the popup surface.
</description>
</event>
</interface>
- <interface name="wl_surface" version="2">
+ <interface name="wl_surface" version="3">
<description summary="an onscreen surface">
A surface is a rectangular area that is displayed on the screen.
It has a location, size and pixel contents.
+ The size of a surface (and relative positions on it) is described
+ in surface local coordinates, which may differ from the buffer
+ local coordinates of the pixel content, in case a buffer_transform
+ or a buffer_scale is used.
+
Surfaces are also used for some special purposes, e.g. as
cursor images for pointers, drag icons, etc.
</description>
@@ -895,20 +983,25 @@
<description summary="set the surface contents">
Set a buffer as the content of this surface.
+ The new size of the surface is calculated based on the buffer
+ size transformed by the inverse buffer_transform and the
+ inverse buffer_scale. This means that the supplied buffer
+ must be an integer multiple of the buffer_scale.
+
The x and y arguments specify the location of the new pending
- buffer's upper left corner, relative to the current buffer's
- upper left corner. In other words, the x and y, and the width
- and height of the wl_buffer together define in which directions
- the surface's size changes.
+ buffer's upper left corner, relative to the current buffer's upper
+ left corner, in surface local coordinates. In other words, the
+ x and y, combined with the new surface size define in which
+ directions the surface's size changes.
Surface contents are double-buffered state, see wl_surface.commit.
The initial surface contents are void; there is no content.
wl_surface.attach assigns the given wl_buffer as the pending
wl_buffer. wl_surface.commit makes the pending wl_buffer the new
- surface contents, and the size of the surface becomes the size of
- the wl_buffer, as described above. After commit, there is no
- pending buffer until the next attach.
+ surface contents, and the size of the surface becomes the size
+ calculated from the wl_buffer, as described above. After commit,
+ there is no pending buffer until the next attach.
Committing a pending wl_buffer allows the compositor to read the
pixels in the wl_buffer. The compositor may access the pixels at
@@ -922,10 +1015,10 @@
Destroying the wl_buffer after wl_buffer.release does not change
the surface contents. However, if the client destroys the
- wl_buffer before receiving wl_buffer.release, the surface
+ wl_buffer before receiving the wl_buffer.release event, the surface
contents become undefined immediately.
- Only if wl_surface.attach is sent with a NULL wl_buffer, the
+ If wl_surface.attach is sent with a NULL wl_buffer, the
following wl_surface.commit will remove the surface content.
</description>
@@ -945,6 +1038,8 @@
Damage is double-buffered state, see wl_surface.commit.
+ The damage rectangle is specified in surface local coordinates.
+
The initial value for pending damage is empty: no damage.
wl_surface.damage adds pending damage: the new pending damage
is the union of old pending damage and the given rectangle.
@@ -996,6 +1091,8 @@
behaviour, but marking transparent content as opaque will result
in repaint artifacts.
+ The opaque region is specified in surface local coordinates.
+
The compositor ignores the parts of the opaque region that fall
outside of the surface.
@@ -1023,6 +1120,8 @@
surface in the server surface stack. The compositor ignores the
parts of the input region that fall outside of the surface.
+ The input region is specified in surface local coordinates.
+
Input region is double-buffered state, see wl_surface.commit.
wl_surface.set_input_region changes the pending input region.
@@ -1100,7 +1199,7 @@
according to the output transform, thus permiting the compositor to
use certain optimizations even if the display is rotated. Using
hardware overlays and scanning out a client buffer for fullscreen
- surfaces are examples of such optmizations. Those optimizations are
+ surfaces are examples of such optimizations. Those optimizations are
highly dependent on the compositor implementation, so the use of this
request should be considered on a case-by-case basis.
@@ -1110,9 +1209,33 @@
</description>
<arg name="transform" type="int"/>
</request>
+
+ <!-- Version 3 additions -->
+
+ <request name="set_buffer_scale" since="3">
+ <description summary="sets the buffer scaling factor">
+ This request sets an optional scaling factor on how the compositor
+ interprets the contents of the buffer attached to the window.
+
+ Buffer scale is double-buffered state, see wl_surface.commit.
+
+ A newly created surface has its buffer scale set to 1.
+
+ The purpose of this request is to allow clients to supply higher
+ resolution buffer data for use on high resolution outputs. Its
+ intended that you pick the same buffer scale as the scale of the
+ output that the surface is displayed on.This means the compositor
+ can avoid scaling when rendering the surface on that output.
+
+ Note that if the scale is larger than 1, then you have to attach
+ a buffer that is larger (by a factor of scale in each dimension)
+ than the desired surface size.
+ </description>
+ <arg name="scale" type="int"/>
+ </request>
</interface>
- <interface name="wl_seat" version="1">
+ <interface name="wl_seat" version="3">
<description summary="group of input devices">
A seat is a group of keyboards, pointer and touch devices. This
object is published as a global during start up, or when such a
@@ -1171,9 +1294,21 @@
</description>
<arg name="id" type="new_id" interface="wl_touch"/>
</request>
+
+ <!-- Version 2 of additions -->
+
+ <event name="name" since="2">
+ <description summary="unique identifier for this seat">
+ In a multiseat configuration this can be used by the client to help
+ identify which physical devices the seat represents. Based on
+ the seat configuration used by the compositor.
+ </description>
+ <arg name="name" type="string"/>
+ </event>
+
</interface>
- <interface name="wl_pointer" version="1">
+ <interface name="wl_pointer" version="3">
<description summary="pointer input device">
The wl_pointer interface represents one or more input devices,
such as mice, which control the pointer location and pointer_focus
@@ -1197,7 +1332,8 @@
The parameters hotspot_x and hotspot_y define the position of
the pointer surface relative to the pointer location. Its
top-left corner is always at (x, y) - (hotspot_x, hotspot_y),
- where (x, y) are the coordinates of the pointer location.
+ where (x, y) are the coordinates of the pointer location, in surface
+ local coordinates.
On surface.attach requests to the pointer surface, hotspot_x
and hotspot_y are decremented by the x and y parameters
@@ -1221,6 +1357,10 @@
<arg name="hotspot_y" type="int" summary="y coordinate in surface-relative coordinates"/>
</request>
+ <request name="release" type="destructor" since="3">
+ <description summary="release the pointer object"/>
+ </request>
+
<event name="enter">
<description summary="enter event">
Notification that this seat's pointer is focused on a certain
@@ -1320,17 +1460,23 @@
</event>
</interface>
- <interface name="wl_keyboard" version="1">
+ <interface name="wl_keyboard" version="3">
<description summary="keyboard input device">
The wl_keyboard interface represents one or more keyboards
associated with a seat.
</description>
+ <request name="release" type="destructor" since="3">
+ <description summary="release the keyboard object"/>
+ </request>
+
<enum name="keymap_format">
<description summary="keyboard mapping format">
This specifies the format of the keymap provided to the
client with the wl_keyboard.keymap event.
</description>
+ <entry name="no_keymap" value="0"
+ summary="no keymap; client must understand how to interpret the raw keycode"/>
<entry name="xkb_v1" value="1" summary="libxkbcommon compatible"/>
</enum>
@@ -1401,7 +1547,7 @@
</event>
</interface>
- <interface name="wl_touch" version="1">
+ <interface name="wl_touch" version="3">
<description summary="touchscreen input device">
The wl_touch interface represents a touchscreen
associated with a seat.
@@ -1413,6 +1559,10 @@
contact point can be identified by the ID of the sequence.
</description>
+ <request name="release" type="destructor" since="3">
+ <description summary="release the touch object"/>
+ </request>
+
<event name="down">
<description summary="touch down event and beginning of a touch sequence">
A new touch point has appeared on the surface. This touch point is
@@ -1467,7 +1617,7 @@
</event>
</interface>
- <interface name="wl_output" version="1">
+ <interface name="wl_output" version="2">
<description summary="compositor output region">
An output describes part of the compositor geometry. The
compositor works in the 'compositor coordinate system' and an
@@ -1559,12 +1709,52 @@
again if an output changes mode, for the mode that is now
current. In other words, the current mode is always the last
mode that was received with the current flag set.
+
+ The size of a mode is given in physical hardware units of
+ the output device. This is not necessarily the same as
+ the output size in the global compositor space. For instance,
+ the output may be scaled, as described in wl_output.scale,
+ or transformed , as described in wl_output.transform.
</description>
<arg name="flags" type="uint" summary="bitfield of mode flags"/>
- <arg name="width" type="int" summary="width of the mode in pixels"/>
- <arg name="height" type="int" summary="height of the mode in pixels"/>
+ <arg name="width" type="int" summary="width of the mode in hardware units"/>
+ <arg name="height" type="int" summary="height of the mode in hardware units"/>
<arg name="refresh" type="int" summary="vertical refresh rate in mHz"/>
</event>
+
+ <event name="done" since="2">
+ <description summary="sent all information about output">
+ This event is sent after all other properties has been
+ sent after binding to the output object and after any
+ other property changes done after that. This allows
+ changes to the output properties to be seen as
+ atomic, even if they happen via multiple events.
+ </description>
+ </event>
+
+ <event name="scale" since="2">
+ <description summary="output scaling properties">
+ This event contains scaling geometry information
+ that is not in the geometry event. It may be sent after
+ binding the output object or if the output scale changes
+ later. If it is not sent, the client should assume a
+ scale of 1.
+
+ A scale larger than 1 means that the compositor will
+ automatically scale surface buffers by this amount
+ when rendering. This is used for very high resolution
+ displays where applications rendering at the native
+ resolution would be too small to be legible.
+
+ It is intended that scaling aware clients track the
+ current output of a surface, and if it is on a scaled
+ output it should use wl_surface.set_buffer_scale with
+ the scale of the output. That way the compositor can
+ avoid scaling the surface, and the client can supply
+ a higher detail image.
+ </description>
+ <arg name="factor" type="int" summary="scaling factor of output"/>
+ </event>
</interface>
<interface name="wl_region" version="1">
diff --git a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h
index 18cc7beb6..7f96ebc6a 100644
--- a/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h
+++ b/src/client/hardwareintegration/qwaylandclientbufferintegrationplugin_p.h
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
class QWaylandClientBufferIntegration;
-#define QWaylandClientBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.2"
+#define QWaylandClientBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3"
class Q_WAYLAND_CLIENT_EXPORT QWaylandClientBufferIntegrationPlugin : public QObject
{
diff --git a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h
index d893da2ab..d5d1d78f5 100644
--- a/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h
+++ b/src/client/hardwareintegration/qwaylandserverbufferintegrationplugin_p.h
@@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE
class QWaylandServerBufferIntegration;
-#define QWaylandServerBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandServerBufferIntegrationFactoryInterface.5.2"
+#define QWaylandServerBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.WaylandClient.QWaylandServerBufferIntegrationFactoryInterface.5.3"
class Q_WAYLAND_CLIENT_EXPORT QWaylandServerBufferIntegrationPlugin : public QObject
{
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index b354ac070..02b7e56c6 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -84,15 +84,18 @@ public:
if (QGuiApplication::desktopSettingsAware()) {
const QByteArray desktopEnvironment = QGuiApplicationPrivate::platformIntegration()->services()->desktopEnvironment();
- // Ignore X11 desktop environments
- if (!desktopEnvironment.isEmpty() &&
+ if (desktopEnvironment == QByteArrayLiteral("KDE")) {
+#ifndef QT_NO_SETTINGS
+ result.push_back(QStringLiteral("kde"));
+#endif
+ } else if (!desktopEnvironment.isEmpty() &&
desktopEnvironment != QByteArrayLiteral("UNKNOWN") &&
- desktopEnvironment != QByteArrayLiteral("KDE") &&
desktopEnvironment != QByteArrayLiteral("GNOME") &&
desktopEnvironment != QByteArrayLiteral("UNITY") &&
desktopEnvironment != QByteArrayLiteral("MATE") &&
desktopEnvironment != QByteArrayLiteral("XFCE") &&
desktopEnvironment != QByteArrayLiteral("LXDE"))
+ // Ignore X11 desktop environments
result.push_back(QString::fromLocal8Bit(desktopEnvironment.toLower()));
}
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
index 639815be4..b92313818 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
@@ -80,7 +80,7 @@ QWaylandCompositor::QWaylandCompositor(QWindow *window, const char *socketName,
qRegisterMetaType<QWaylandSurface*>("WaylandSurface*");
#endif
m_compositor->initializeHardwareIntegration();
- m_compositor->initializeWindowManagerProtocol();
+ m_compositor->initializeExtensions();
m_compositor->initializeDefaultInputDevice();
}
diff --git a/src/compositor/compositor_api/qwaylandsurfaceitem.cpp b/src/compositor/compositor_api/qwaylandsurfaceitem.cpp
index 6b71fa8ae..04649fa76 100644
--- a/src/compositor/compositor_api/qwaylandsurfaceitem.cpp
+++ b/src/compositor/compositor_api/qwaylandsurfaceitem.cpp
@@ -143,16 +143,15 @@ void QWaylandSurfaceItem::init(QWaylandSurface *surface)
Qt::ExtraButton9 | Qt::ExtraButton10 | Qt::ExtraButton11 |
Qt::ExtraButton12 | Qt::ExtraButton13);
setAcceptHoverEvents(true);
- connect(surface, SIGNAL(mapped()), this, SLOT(surfaceMapped()));
- connect(surface, SIGNAL(unmapped()), this, SLOT(surfaceUnmapped()));
- connect(surface, SIGNAL(destroyed(QObject*)), this, SLOT(surfaceDestroyed(QObject*)));
- connect(surface, SIGNAL(damaged(QRect)), this, SLOT(surfaceDamaged(QRect)));
- connect(surface, SIGNAL(parentChanged(QWaylandSurface*,QWaylandSurface*)),
- this, SLOT(parentChanged(QWaylandSurface*,QWaylandSurface*)));
- connect(surface, SIGNAL(sizeChanged()), this, SLOT(updateSize()));
- connect(surface, SIGNAL(posChanged()), this, SLOT(updatePosition()));
- connect(this, SIGNAL(widthChanged()), this, SLOT(updateSurfaceSize()));
- connect(this, SIGNAL(heightChanged()), this, SLOT(updateSurfaceSize()));
+ connect(surface, &QWaylandSurface::mapped, this, &QWaylandSurfaceItem::surfaceMapped);
+ connect(surface, &QWaylandSurface::unmapped, this, &QWaylandSurfaceItem::surfaceUnmapped);
+ connect(surface, &QWaylandSurface::destroyed, this, &QWaylandSurfaceItem::surfaceDestroyed);
+ connect(surface, &QWaylandSurface::damaged, this, &QWaylandSurfaceItem::surfaceDamaged);
+ connect(surface, &QWaylandSurface::parentChanged, this, &QWaylandSurfaceItem::parentChanged);
+ connect(surface, &QWaylandSurface::sizeChanged, this, &QWaylandSurfaceItem::updateSize);
+ connect(surface, &QWaylandSurface::posChanged, this, &QWaylandSurfaceItem::updatePosition);
+ connect(this, &QWaylandSurfaceItem::widthChanged, this, &QWaylandSurfaceItem::updateSurfaceSize);
+ connect(this, &QWaylandSurfaceItem::heightChanged, this, &QWaylandSurfaceItem::updateSurfaceSize);
m_damaged = false;
m_yInverted = surface ? surface->isYInverted() : true;
@@ -191,7 +190,7 @@ void QWaylandSurfaceItem::ensureProvider()
{
if (!m_provider) {
m_provider = new QWaylandSurfaceTextureProvider();
- connect(window(), SIGNAL(sceneGraphInvalidated()), m_provider, SLOT(invalidate()), Qt::DirectConnection);
+ connect(window(), &QQuickWindow::sceneGraphInvalidated, m_provider, &QWaylandSurfaceTextureProvider::invalidate, Qt::DirectConnection);
}
}
diff --git a/src/compositor/hardware_integration/hardware_integration.pri b/src/compositor/hardware_integration/hardware_integration.pri
index 999434d93..39843b3f5 100644
--- a/src/compositor/hardware_integration/hardware_integration.pri
+++ b/src/compositor/hardware_integration/hardware_integration.pri
@@ -7,21 +7,21 @@ isEmpty(QT_WAYLAND_GL_CONFIG):QT_WAYLAND_GL_CONFIG = $$(QT_WAYLAND_GL_CONFIG)
../extensions/hardware-integration.xml
HEADERS += \
- hardware_integration/qwaylandclientbufferintegration.h \
- hardware_integration/qwaylandclientbufferintegrationfactory.h \
- hardware_integration/qwaylandclientbufferintegrationplugin.h \
- hardware_integration/qwaylandserverbufferintegration.h \
- hardware_integration/qwaylandserverbufferintegrationfactory.h \
- hardware_integration/qwaylandserverbufferintegrationplugin.h \
+ hardware_integration/qwlclientbufferintegration_p.h \
+ hardware_integration/qwlclientbufferintegrationfactory_p.h \
+ hardware_integration/qwlclientbufferintegrationplugin_p.h \
+ hardware_integration/qwlserverbufferintegration_p.h \
+ hardware_integration/qwlserverbufferintegrationfactory_p.h \
+ hardware_integration/qwlserverbufferintegrationplugin_p.h \
hardware_integration/qwlhwintegration_p.h
SOURCES += \
- hardware_integration/qwaylandclientbufferintegration.cpp \
- hardware_integration/qwaylandclientbufferintegrationfactory.cpp \
- hardware_integration/qwaylandclientbufferintegrationplugin.cpp \
- hardware_integration/qwaylandserverbufferintegration.cpp \
- hardware_integration/qwaylandserverbufferintegrationfactory.cpp \
- hardware_integration/qwaylandserverbufferintegrationplugin.cpp \
+ hardware_integration/qwlclientbufferintegration.cpp \
+ hardware_integration/qwlclientbufferintegrationfactory.cpp \
+ hardware_integration/qwlclientbufferintegrationplugin.cpp \
+ hardware_integration/qwlserverbufferintegration.cpp \
+ hardware_integration/qwlserverbufferintegrationfactory.cpp \
+ hardware_integration/qwlserverbufferintegrationplugin.cpp \
hardware_integration/qwlhwintegration.cpp
DEFINES += QT_COMPOSITOR_WAYLAND_GL
diff --git a/src/compositor/hardware_integration/qwaylandclientbufferintegration.cpp b/src/compositor/hardware_integration/qwlclientbufferintegration.cpp
index ff463429f..ee3bdeb84 100644
--- a/src/compositor/hardware_integration/qwaylandclientbufferintegration.cpp
+++ b/src/compositor/hardware_integration/qwlclientbufferintegration.cpp
@@ -38,13 +38,17 @@
**
****************************************************************************/
-#include "qwaylandclientbufferintegration.h"
+#include "qwlclientbufferintegration_p.h"
QT_BEGIN_NAMESPACE
-QWaylandClientBufferIntegration::QWaylandClientBufferIntegration()
+namespace QtWayland {
+
+ClientBufferIntegration::ClientBufferIntegration()
: m_compositor(0)
{
}
+}
+
QT_END_NAMESPACE
diff --git a/src/compositor/hardware_integration/qwaylandclientbufferintegration.h b/src/compositor/hardware_integration/qwlclientbufferintegration_p.h
index 5d9902fad..c9d514078 100644
--- a/src/compositor/hardware_integration/qwaylandclientbufferintegration.h
+++ b/src/compositor/hardware_integration/qwlclientbufferintegration_p.h
@@ -41,23 +41,24 @@
#ifndef QWAYLANDCLIENTBUFFERINTEGRATION_H
#define QWAYLANDCLIENTBUFFERINTEGRATION_H
+#include <QtCompositor/qwaylandexport.h>
+#include <QtCore/QSize>
#include <QtGui/qopengl.h>
#include <QtGui/QOpenGLContext>
#include <wayland-server.h>
-#include <QtCompositor/qwaylandcompositor.h>
-
QT_BEGIN_NAMESPACE
+class QWaylandCompositor;
+
namespace QtWayland {
- class Display;
-}
+class Display;
-class Q_COMPOSITOR_EXPORT QWaylandClientBufferIntegration
+class Q_COMPOSITOR_EXPORT ClientBufferIntegration
{
public:
- QWaylandClientBufferIntegration();
- virtual ~QWaylandClientBufferIntegration() { }
+ ClientBufferIntegration();
+ virtual ~ClientBufferIntegration() { }
void setCompositor(QWaylandCompositor *compositor) { m_compositor = compositor; }
@@ -82,6 +83,8 @@ protected:
QWaylandCompositor *m_compositor;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDCLIENTBUFFERINTEGRATION_H
diff --git a/src/compositor/hardware_integration/qwaylandserverbufferintegrationfactory.cpp b/src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp
index 2a99bda98..1a4dbac4c 100644
--- a/src/compositor/hardware_integration/qwaylandserverbufferintegrationfactory.cpp
+++ b/src/compositor/hardware_integration/qwlclientbufferintegrationfactory.cpp
@@ -39,23 +39,25 @@
**
****************************************************************************/
-#include "qwaylandserverbufferintegrationfactory.h"
-#include "qwaylandserverbufferintegrationplugin.h"
-#include "qwaylandserverbufferintegration.h"
+#include "qwlclientbufferintegrationfactory_p.h"
+#include "qwlclientbufferintegrationplugin_p.h"
+#include "qwlclientbufferintegration_p.h"
#include <QtCore/private/qfactoryloader_p.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QDir>
QT_BEGIN_NAMESPACE
+namespace QtWayland {
+
#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
- (QWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration/server"), Qt::CaseInsensitive))
+ (QtWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration/server"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
- (QWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
+ (QtWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
#endif
-QStringList QWaylandServerBufferIntegrationFactory::keys(const QString &pluginPath)
+QStringList ClientBufferIntegrationFactory::keys(const QString &pluginPath)
{
#ifndef QT_NO_LIBRARY
QStringList list;
@@ -78,19 +80,21 @@ QStringList QWaylandServerBufferIntegrationFactory::keys(const QString &pluginPa
#endif
}
-QWaylandServerBufferIntegration *QWaylandServerBufferIntegrationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
+ClientBufferIntegration *ClientBufferIntegrationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
{
#ifndef QT_NO_LIBRARY
// Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
- if (QWaylandServerBufferIntegration *ret = qLoadPlugin1<QWaylandServerBufferIntegration, QWaylandServerBufferIntegrationPlugin>(directLoader(), name, args))
+ if (ClientBufferIntegration *ret = qLoadPlugin1<ClientBufferIntegration, ClientBufferIntegrationPlugin>(directLoader(), name, args))
return ret;
}
- if (QWaylandServerBufferIntegration *ret = qLoadPlugin1<QWaylandServerBufferIntegration, QWaylandServerBufferIntegrationPlugin>(loader(), name, args))
+ if (ClientBufferIntegration *ret = qLoadPlugin1<ClientBufferIntegration, ClientBufferIntegrationPlugin>(loader(), name, args))
return ret;
#endif
return 0;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/compositor/hardware_integration/qwaylandclientbufferintegrationfactory.h b/src/compositor/hardware_integration/qwlclientbufferintegrationfactory_p.h
index c9d95f8f7..ccefba426 100644
--- a/src/compositor/hardware_integration/qwaylandclientbufferintegrationfactory.h
+++ b/src/compositor/hardware_integration/qwlclientbufferintegrationfactory_p.h
@@ -47,15 +47,19 @@
QT_BEGIN_NAMESPACE
-class QWaylandClientBufferIntegration;
+namespace QtWayland {
-class Q_COMPOSITOR_EXPORT QWaylandClientBufferIntegrationFactory
+class ClientBufferIntegration;
+
+class Q_COMPOSITOR_EXPORT ClientBufferIntegrationFactory
{
public:
static QStringList keys(const QString &pluginPath = QString());
- static QWaylandClientBufferIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
+ static ClientBufferIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H
diff --git a/src/compositor/hardware_integration/qwaylandserverbufferintegrationplugin.cpp b/src/compositor/hardware_integration/qwlclientbufferintegrationplugin.cpp
index ebe860b4d..1f3f2d116 100644
--- a/src/compositor/hardware_integration/qwaylandserverbufferintegrationplugin.cpp
+++ b/src/compositor/hardware_integration/qwlclientbufferintegrationplugin.cpp
@@ -39,18 +39,21 @@
**
****************************************************************************/
-#include "qwaylandserverbufferintegrationplugin.h"
+#include "qwlclientbufferintegrationplugin_p.h"
QT_BEGIN_NAMESPACE
-QWaylandServerBufferIntegrationPlugin::QWaylandServerBufferIntegrationPlugin(QObject *parent) :
+namespace QtWayland {
+
+ClientBufferIntegrationPlugin::ClientBufferIntegrationPlugin(QObject *parent) :
QObject(parent)
{
}
-QWaylandServerBufferIntegrationPlugin::~QWaylandServerBufferIntegrationPlugin()
+ClientBufferIntegrationPlugin::~ClientBufferIntegrationPlugin()
{
}
-QT_END_NAMESPACE
+}
+QT_END_NAMESPACE
diff --git a/src/compositor/hardware_integration/qwaylandclientbufferintegrationplugin.h b/src/compositor/hardware_integration/qwlclientbufferintegrationplugin_p.h
index 9e3ff381f..3ff26cd92 100644
--- a/src/compositor/hardware_integration/qwaylandclientbufferintegrationplugin.h
+++ b/src/compositor/hardware_integration/qwlclientbufferintegrationplugin_p.h
@@ -49,20 +49,24 @@
QT_BEGIN_NAMESPACE
-class QWaylandClientBufferIntegration;
+namespace QtWayland {
-#define QWaylandClientBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.Compositor.QWaylandClientBufferIntegrationFactoryInterface.5.2"
+class ClientBufferIntegration;
-class Q_COMPOSITOR_EXPORT QWaylandClientBufferIntegrationPlugin : public QObject
+#define QtWaylandClientBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.Compositor.QtWaylandClientBufferIntegrationFactoryInterface.5.3"
+
+class Q_COMPOSITOR_EXPORT ClientBufferIntegrationPlugin : public QObject
{
Q_OBJECT
public:
- explicit QWaylandClientBufferIntegrationPlugin(QObject *parent = 0);
- ~QWaylandClientBufferIntegrationPlugin();
+ explicit ClientBufferIntegrationPlugin(QObject *parent = 0);
+ ~ClientBufferIntegrationPlugin();
- virtual QWaylandClientBufferIntegration *create(const QString &key, const QStringList &paramList) = 0;
+ virtual ClientBufferIntegration *create(const QString &key, const QStringList &paramList) = 0;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H
diff --git a/src/compositor/hardware_integration/qwaylandserverbufferintegration.cpp b/src/compositor/hardware_integration/qwlserverbufferintegration.cpp
index 520f9307b..3c9ceb645 100644
--- a/src/compositor/hardware_integration/qwaylandserverbufferintegration.cpp
+++ b/src/compositor/hardware_integration/qwlserverbufferintegration.cpp
@@ -38,38 +38,42 @@
**
****************************************************************************/
-#include "qwaylandserverbufferintegration.h"
+#include "qwlserverbufferintegration_p.h"
QT_BEGIN_NAMESPACE
-QWaylandServerBuffer::QWaylandServerBuffer(const QSize &size, QWaylandServerBuffer::Format format)
+namespace QtWayland {
+
+ServerBuffer::ServerBuffer(const QSize &size, ServerBuffer::Format format)
: m_size(size)
, m_format(format)
{ }
-QWaylandServerBuffer::~QWaylandServerBuffer()
+ServerBuffer::~ServerBuffer()
{ }
-bool QWaylandServerBuffer::isYInverted() const
+bool ServerBuffer::isYInverted() const
{
return false;
}
-QSize QWaylandServerBuffer::size() const
+QSize ServerBuffer::size() const
{ return m_size; }
-QWaylandServerBuffer::Format QWaylandServerBuffer::format() const
+ServerBuffer::Format ServerBuffer::format() const
{ return m_format; }
-QWaylandServerBufferIntegration::QWaylandServerBufferIntegration()
+ServerBufferIntegration::ServerBufferIntegration()
{ }
-QWaylandServerBufferIntegration::~QWaylandServerBufferIntegration()
+ServerBufferIntegration::~ServerBufferIntegration()
{ }
-void QWaylandServerBufferIntegration::initializeHardware(QWaylandCompositor *compositor)
+void ServerBufferIntegration::initializeHardware(QWaylandCompositor *compositor)
{
Q_UNUSED(compositor);
}
+}
+
QT_END_NAMESPACE
diff --git a/src/compositor/hardware_integration/qwaylandserverbufferintegration.h b/src/compositor/hardware_integration/qwlserverbufferintegration_p.h
index 7033cd753..6fd7276af 100644
--- a/src/compositor/hardware_integration/qwaylandserverbufferintegration.h
+++ b/src/compositor/hardware_integration/qwlserverbufferintegration_p.h
@@ -55,10 +55,9 @@ struct wl_client;
struct wl_resource;
namespace QtWayland {
- class Display;
-}
+class Display;
-class Q_COMPOSITOR_EXPORT QWaylandServerBuffer
+class Q_COMPOSITOR_EXPORT ServerBuffer
{
public:
enum Format {
@@ -66,8 +65,8 @@ public:
A8
};
- QWaylandServerBuffer(const QSize &size, QWaylandServerBuffer::Format format);
- virtual ~QWaylandServerBuffer();
+ ServerBuffer(const QSize &size, ServerBuffer::Format format);
+ virtual ~ServerBuffer();
virtual struct ::wl_resource *resourceForClient(struct ::wl_client *) = 0;
@@ -82,18 +81,20 @@ protected:
Format m_format;
};
-class Q_COMPOSITOR_EXPORT QWaylandServerBufferIntegration
+class Q_COMPOSITOR_EXPORT ServerBufferIntegration
{
public:
- QWaylandServerBufferIntegration();
- virtual ~QWaylandServerBufferIntegration();
+ ServerBufferIntegration();
+ virtual ~ServerBufferIntegration();
virtual void initializeHardware(QWaylandCompositor *);
- virtual bool supportsFormat(QWaylandServerBuffer::Format format) const = 0;
- virtual QWaylandServerBuffer *createServerBuffer(const QSize &size, QWaylandServerBuffer::Format format) = 0;
+ virtual bool supportsFormat(ServerBuffer::Format format) const = 0;
+ virtual ServerBuffer *createServerBuffer(const QSize &size, ServerBuffer::Format format) = 0;
};
+}
+
QT_END_NAMESPACE
#endif //QWAYLANDSERVERBUFFERINTEGRATION_H
diff --git a/src/compositor/hardware_integration/qwaylandclientbufferintegrationfactory.cpp b/src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp
index 71ea9ec4d..6652d25a0 100644
--- a/src/compositor/hardware_integration/qwaylandclientbufferintegrationfactory.cpp
+++ b/src/compositor/hardware_integration/qwlserverbufferintegrationfactory.cpp
@@ -39,23 +39,25 @@
**
****************************************************************************/
-#include "qwaylandclientbufferintegrationfactory.h"
-#include "qwaylandclientbufferintegrationplugin.h"
-#include "qwaylandclientbufferintegration.h"
+#include "qwlserverbufferintegrationfactory_p.h"
+#include "qwlserverbufferintegrationplugin_p.h"
+#include "qwlserverbufferintegration_p.h"
#include <QtCore/private/qfactoryloader_p.h>
#include <QtCore/QCoreApplication>
#include <QtCore/QDir>
QT_BEGIN_NAMESPACE
+namespace QtWayland {
+
#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
- (QWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration/server"), Qt::CaseInsensitive))
+ (QtWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String("/wayland-graphics-integration/server"), Qt::CaseInsensitive))
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
- (QWaylandClientBufferIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
+ (QtWaylandServerBufferIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
#endif
-QStringList QWaylandClientBufferIntegrationFactory::keys(const QString &pluginPath)
+QStringList ServerBufferIntegrationFactory::keys(const QString &pluginPath)
{
#ifndef QT_NO_LIBRARY
QStringList list;
@@ -78,19 +80,21 @@ QStringList QWaylandClientBufferIntegrationFactory::keys(const QString &pluginPa
#endif
}
-QWaylandClientBufferIntegration *QWaylandClientBufferIntegrationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
+ServerBufferIntegration *ServerBufferIntegrationFactory::create(const QString &name, const QStringList &args, const QString &pluginPath)
{
#ifndef QT_NO_LIBRARY
// Try loading the plugin from platformPluginPath first:
if (!pluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(pluginPath);
- if (QWaylandClientBufferIntegration *ret = qLoadPlugin1<QWaylandClientBufferIntegration, QWaylandClientBufferIntegrationPlugin>(directLoader(), name, args))
+ if (ServerBufferIntegration *ret = qLoadPlugin1<ServerBufferIntegration, ServerBufferIntegrationPlugin>(directLoader(), name, args))
return ret;
}
- if (QWaylandClientBufferIntegration *ret = qLoadPlugin1<QWaylandClientBufferIntegration, QWaylandClientBufferIntegrationPlugin>(loader(), name, args))
+ if (ServerBufferIntegration *ret = qLoadPlugin1<ServerBufferIntegration, ServerBufferIntegrationPlugin>(loader(), name, args))
return ret;
#endif
return 0;
}
+}
+
QT_END_NAMESPACE
diff --git a/src/compositor/hardware_integration/qwaylandserverbufferintegrationfactory.h b/src/compositor/hardware_integration/qwlserverbufferintegrationfactory_p.h
index c7fe384cd..1fc81c950 100644
--- a/src/compositor/hardware_integration/qwaylandserverbufferintegrationfactory.h
+++ b/src/compositor/hardware_integration/qwlserverbufferintegrationfactory_p.h
@@ -47,15 +47,19 @@
QT_BEGIN_NAMESPACE
-class QWaylandServerBufferIntegration;
+namespace QtWayland {
-class Q_COMPOSITOR_EXPORT QWaylandServerBufferIntegrationFactory
+class ServerBufferIntegration;
+
+class Q_COMPOSITOR_EXPORT ServerBufferIntegrationFactory
{
public:
static QStringList keys(const QString &pluginPath = QString());
- static QWaylandServerBufferIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
+ static ServerBufferIntegration *create(const QString &name, const QStringList &args, const QString &pluginPath = QString());
};
+}
+
QT_END_NAMESPACE
#endif //QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H
diff --git a/src/compositor/hardware_integration/qwaylandclientbufferintegrationplugin.cpp b/src/compositor/hardware_integration/qwlserverbufferintegrationplugin.cpp
index 58bb26d19..def78391e 100644
--- a/src/compositor/hardware_integration/qwaylandclientbufferintegrationplugin.cpp
+++ b/src/compositor/hardware_integration/qwlserverbufferintegrationplugin.cpp
@@ -39,17 +39,22 @@
**
****************************************************************************/
-#include "qwaylandclientbufferintegrationplugin.h"
+#include "qwlserverbufferintegrationplugin_p.h"
QT_BEGIN_NAMESPACE
-QWaylandClientBufferIntegrationPlugin::QWaylandClientBufferIntegrationPlugin(QObject *parent) :
+namespace QtWayland {
+
+ServerBufferIntegrationPlugin::ServerBufferIntegrationPlugin(QObject *parent) :
QObject(parent)
{
}
-QWaylandClientBufferIntegrationPlugin::~QWaylandClientBufferIntegrationPlugin()
+ServerBufferIntegrationPlugin::~ServerBufferIntegrationPlugin()
{
}
+}
+
QT_END_NAMESPACE
+
diff --git a/src/compositor/hardware_integration/qwaylandserverbufferintegrationplugin.h b/src/compositor/hardware_integration/qwlserverbufferintegrationplugin_p.h
index ce01aed02..cb18b34df 100644
--- a/src/compositor/hardware_integration/qwaylandserverbufferintegrationplugin.h
+++ b/src/compositor/hardware_integration/qwlserverbufferintegrationplugin_p.h
@@ -49,20 +49,24 @@
QT_BEGIN_NAMESPACE
-class QWaylandServerBufferIntegration;
+namespace QtWayland {
-#define QWaylandServerBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.Compositor.QWaylandServerBufferIntegrationFactoryInterface.5.2"
+class ServerBufferIntegration;
-class Q_COMPOSITOR_EXPORT QWaylandServerBufferIntegrationPlugin : public QObject
+#define QtWaylandServerBufferIntegrationFactoryInterface_iid "org.qt-project.Qt.Compositor.QtWaylandServerBufferIntegrationFactoryInterface.5.3"
+
+class Q_COMPOSITOR_EXPORT ServerBufferIntegrationPlugin : public QObject
{
Q_OBJECT
public:
- explicit QWaylandServerBufferIntegrationPlugin(QObject *parent = 0);
- ~QWaylandServerBufferIntegrationPlugin();
+ explicit ServerBufferIntegrationPlugin(QObject *parent = 0);
+ ~ServerBufferIntegrationPlugin();
- virtual QWaylandServerBufferIntegration *create(const QString &key, const QStringList &paramList) = 0;
+ virtual ServerBufferIntegration *create(const QString &key, const QStringList &paramList) = 0;
};
+}
+
QT_END_NAMESPACE
#endif // QWAYLANDSERVERBUFFERINTEGRATIONPLUGIN_H
diff --git a/src/compositor/wayland_wrapper/qwlcompositor.cpp b/src/compositor/wayland_wrapper/qwlcompositor.cpp
index 7d5cd35f1..672924ed4 100644
--- a/src/compositor/wayland_wrapper/qwlcompositor.cpp
+++ b/src/compositor/wayland_wrapper/qwlcompositor.cpp
@@ -88,12 +88,12 @@
#include <wayland-server.h>
#include "hardware_integration/qwlhwintegration_p.h"
-#include "hardware_integration/qwaylandclientbufferintegration.h"
-#include "hardware_integration/qwaylandserverbufferintegration.h"
+#include "hardware_integration/qwlclientbufferintegration_p.h"
+#include "hardware_integration/qwlserverbufferintegration_p.h"
#include "waylandwindowmanagerintegration.h"
-#include "hardware_integration/qwaylandclientbufferintegrationfactory.h"
-#include "hardware_integration/qwaylandserverbufferintegrationfactory.h"
+#include "hardware_integration/qwlclientbufferintegrationfactory_p.h"
+#include "hardware_integration/qwlserverbufferintegrationfactory_p.h"
QT_BEGIN_NAMESPACE
@@ -123,7 +123,8 @@ void Compositor::bind_func(struct wl_client *client, void *data,
uint32_t version, uint32_t id)
{
Q_UNUSED(version);
- wl_client_add_object(client,&wl_compositor_interface, &compositor_interface, id,data);
+ struct wl_resource *resource = wl_resource_create(client, &wl_compositor_interface, version, id);
+ wl_resource_set_implementation(resource, &compositor_interface, data, 0);
}
Compositor *Compositor::instance()
@@ -157,10 +158,11 @@ Compositor::Compositor(QWaylandCompositor *qt_compositor, QWaylandCompositor::Ex
m_timer.start();
compositor = this;
- if (extensions & QWaylandCompositor::WindowManagerExtension)
- m_windowManagerIntegration = new WindowManagerServerIntegration(qt_compositor, this);
-
- wl_display_add_global(m_display->handle(),&wl_compositor_interface,this,Compositor::bind_func);
+ wl_global_create(m_display->handle(),
+ &wl_compositor_interface,
+ wl_compositor_interface.version,
+ this,
+ Compositor::bind_func);
m_data_device_manager = new DataDeviceManager(this);
@@ -169,32 +171,11 @@ Compositor::Compositor(QWaylandCompositor *qt_compositor, QWaylandCompositor::Ex
m_output_global = new OutputGlobal(m_display->handle());
m_shell = new Shell();
- wl_display_add_global(m_display->handle(), &wl_shell_interface, m_shell, Shell::bind_func);
-
-#if defined (QT_COMPOSITOR_WAYLAND_GL)
- if (extensions & QWaylandCompositor::HardwareIntegrationExtension)
- m_hw_integration.reset(new HardwareIntegration(this));
- QWindow *window = qt_compositor->window();
- if (window && window->surfaceType() != QWindow::RasterSurface) {
- loadClientBufferIntegration();
- loadServerBufferIntegration();
- }
-#endif
-
- if (extensions & QWaylandCompositor::OutputExtension)
- m_outputExtension = new OutputExtensionGlobal(this);
- if (extensions & QWaylandCompositor::SurfaceExtension)
- m_surfaceExtension = new SurfaceExtensionGlobal(this);
- if (extensions & QWaylandCompositor::SubSurfaceExtension)
- m_subSurfaceExtension = new SubSurfaceExtensionGlobal(this);
- if (extensions & QWaylandCompositor::TouchExtension)
- m_touchExtension = new TouchExtensionGlobal(this);
- if (extensions & QWaylandCompositor::QtKeyExtension)
- m_qtkeyExtension = new QtKeyExtensionGlobal(this);
- if (extensions & QWaylandCompositor::TextInputExtension) {
- m_textInputManager.reset(new TextInputManager(this));
- m_inputPanel.reset(new InputPanel(this));
- }
+ wl_global_create(m_display->handle(),
+ &wl_shell_interface,
+ wl_shell_interface.version,
+ m_shell,
+ Shell::bind_func);
if (wl_display_add_socket(m_display->handle(), qt_compositor->socketName())) {
fprintf(stderr, "Fatal: Failed to open server socket\n");
@@ -215,7 +196,7 @@ Compositor::Compositor(QWaylandCompositor *qt_compositor, QWaylandCompositor::Ex
//initialize distancefieldglyphcache here
#ifdef QT_COMPOSITOR_QUICK
- if (QQuickWindow *w = qobject_cast<QQuickWindow *>(window)) {
+ if (QQuickWindow *w = qobject_cast<QQuickWindow *>(qt_compositor->window())) {
connect(w, SIGNAL(beforeSynchronizing()), this, SLOT(cleanupGraphicsResources()), Qt::DirectConnection);
} else
#endif
@@ -322,7 +303,7 @@ QWindow *Compositor::window() const
return m_qt_compositor->window();
}
-QWaylandClientBufferIntegration * Compositor::clientBufferIntegration() const
+ClientBufferIntegration * Compositor::clientBufferIntegration() const
{
#ifdef QT_COMPOSITOR_WAYLAND_GL
return m_client_buffer_integration.data();
@@ -331,7 +312,7 @@ QWaylandClientBufferIntegration * Compositor::clientBufferIntegration() const
#endif
}
-QWaylandServerBufferIntegration * Compositor::serverBufferIntegration() const
+ServerBufferIntegration * Compositor::serverBufferIntegration() const
{
#ifdef QT_COMPOSITOR_WAYLAND_GL
return m_server_buffer_integration.data();
@@ -343,6 +324,14 @@ QWaylandServerBufferIntegration * Compositor::serverBufferIntegration() const
void Compositor::initializeHardwareIntegration()
{
#ifdef QT_COMPOSITOR_WAYLAND_GL
+ if (m_extensions & QWaylandCompositor::HardwareIntegrationExtension)
+ m_hw_integration.reset(new HardwareIntegration(this));
+ QWindow *window = m_qt_compositor->window();
+ if (window && window->surfaceType() != QWindow::RasterSurface) {
+ loadClientBufferIntegration();
+ loadServerBufferIntegration();
+ }
+
if (m_client_buffer_integration)
m_client_buffer_integration->initializeHardware(m_display);
if (m_server_buffer_integration)
@@ -350,16 +339,32 @@ void Compositor::initializeHardwareIntegration()
#endif
}
-void Compositor::initializeDefaultInputDevice()
+void Compositor::initializeExtensions()
{
- m_default_wayland_input_device = new QWaylandInputDevice(m_qt_compositor);
- m_default_input_device = m_default_wayland_input_device->handle();
+ if (m_extensions & QWaylandCompositor::OutputExtension)
+ m_outputExtension = new OutputExtensionGlobal(this);
+ if (m_extensions & QWaylandCompositor::SurfaceExtension)
+ m_surfaceExtension = new SurfaceExtensionGlobal(this);
+ if (m_extensions & QWaylandCompositor::SubSurfaceExtension)
+ m_subSurfaceExtension = new SubSurfaceExtensionGlobal(this);
+ if (m_extensions & QWaylandCompositor::TouchExtension)
+ m_touchExtension = new TouchExtensionGlobal(this);
+ if (m_extensions & QWaylandCompositor::QtKeyExtension)
+ m_qtkeyExtension = new QtKeyExtensionGlobal(this);
+ if (m_extensions & QWaylandCompositor::TextInputExtension) {
+ m_textInputManager.reset(new TextInputManager(this));
+ m_inputPanel.reset(new InputPanel(this));
+ }
+ if (m_extensions & QWaylandCompositor::WindowManagerExtension) {
+ m_windowManagerIntegration = new WindowManagerServerIntegration(m_qt_compositor, this);
+ m_windowManagerIntegration->initialize(m_display);
+ }
}
-void Compositor::initializeWindowManagerProtocol()
+void Compositor::initializeDefaultInputDevice()
{
- if (m_windowManagerIntegration)
- m_windowManagerIntegration->initialize(m_display);
+ m_default_wayland_input_device = new QWaylandInputDevice(m_qt_compositor);
+ m_default_input_device = m_default_wayland_input_device->handle();
}
QList<struct wl_client *> Compositor::clients() const
@@ -523,7 +528,7 @@ void Compositor::sendDragEndEvent()
void Compositor::loadClientBufferIntegration()
{
- QStringList keys = QWaylandClientBufferIntegrationFactory::keys();
+ QStringList keys = ClientBufferIntegrationFactory::keys();
QString targetKey;
QByteArray clientBufferIntegration = qgetenv("QT_WAYLAND_HARDWARE_INTEGRATION");
if (clientBufferIntegration.isEmpty())
@@ -537,7 +542,7 @@ void Compositor::loadClientBufferIntegration()
}
if (!targetKey.isEmpty()) {
- m_client_buffer_integration.reset(QWaylandClientBufferIntegrationFactory::create(targetKey, QStringList()));
+ m_client_buffer_integration.reset(ClientBufferIntegrationFactory::create(targetKey, QStringList()));
if (m_client_buffer_integration) {
m_client_buffer_integration->setCompositor(m_qt_compositor);
if (m_hw_integration)
@@ -549,14 +554,14 @@ void Compositor::loadClientBufferIntegration()
void Compositor::loadServerBufferIntegration()
{
- QStringList keys = QWaylandServerBufferIntegrationFactory::keys();
+ QStringList keys = ServerBufferIntegrationFactory::keys();
QString targetKey;
QByteArray serverBufferIntegration = qgetenv("QT_WAYLAND_SERVER_BUFFER_INTEGRATION");
if (keys.contains(QString::fromLocal8Bit(serverBufferIntegration.constData()))) {
targetKey = QString::fromLocal8Bit(serverBufferIntegration.constData());
}
if (!targetKey.isEmpty()) {
- m_server_buffer_integration.reset(QWaylandServerBufferIntegrationFactory::create(targetKey, QStringList()));
+ m_server_buffer_integration.reset(ServerBufferIntegrationFactory::create(targetKey, QStringList()));
if (m_hw_integration)
m_hw_integration->setServerBufferIntegration(targetKey);
}
diff --git a/src/compositor/wayland_wrapper/qwlcompositor_p.h b/src/compositor/wayland_wrapper/qwlcompositor_p.h
index bd60a5cfd..8cc7aef9a 100644
--- a/src/compositor/wayland_wrapper/qwlcompositor_p.h
+++ b/src/compositor/wayland_wrapper/qwlcompositor_p.h
@@ -57,8 +57,6 @@ QT_BEGIN_NAMESPACE
class QWaylandCompositor;
class QWaylandInputDevice;
-class QWaylandClientBufferIntegration;
-class QWaylandServerBufferIntegration;
class WindowManagerServerIntegration;
class QMimeData;
class QPlatformScreenBuffer;
@@ -80,6 +78,8 @@ class QtKeyExtensionGlobal;
class TextInputManager;
class InputPanel;
class HardwareIntegration;
+class ClientBufferIntegration;
+class ServerBufferIntegration;
class Q_COMPOSITOR_EXPORT Compositor : public QObject
{
@@ -102,9 +102,10 @@ public:
QWindow *window() const;
- QWaylandClientBufferIntegration *clientBufferIntegration() const;
- QWaylandServerBufferIntegration *serverBufferIntegration() const;
+ ClientBufferIntegration *clientBufferIntegration() const;
+ ServerBufferIntegration *serverBufferIntegration() const;
void initializeHardwareIntegration();
+ void initializeExtensions();
void initializeDefaultInputDevice();
void initializeWindowManagerProtocol();
@@ -196,8 +197,8 @@ private:
#ifdef QT_COMPOSITOR_WAYLAND_GL
QScopedPointer<HardwareIntegration> m_hw_integration;
- QScopedPointer<QWaylandClientBufferIntegration> m_client_buffer_integration;
- QScopedPointer<QWaylandServerBufferIntegration> m_server_buffer_integration;
+ QScopedPointer<ClientBufferIntegration> m_client_buffer_integration;
+ QScopedPointer<ServerBufferIntegration> m_server_buffer_integration;
#endif
//extensions
diff --git a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
index 7730e0347..98852a2b4 100644
--- a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
+++ b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
@@ -217,7 +217,8 @@ bool DataDeviceManager::offerFromCompositorToClient(wl_resource *clientDataDevic
//qDebug("compositor offers %d types to %p", m_retainedData.formats().count(), client);
struct wl_resource *selectionOffer =
- wl_client_new_object(client, &wl_data_offer_interface, &compositor_offer_interface, this);
+ wl_resource_create(client, &wl_data_offer_interface, -1, 0);
+ wl_resource_set_implementation(selectionOffer, &compositor_offer_interface, this, 0);
wl_data_device_send_data_offer(clientDataDeviceResource, selectionOffer);
foreach (const QString &format, m_retainedData.formats()) {
QByteArray ba = format.toLatin1();
diff --git a/src/compositor/wayland_wrapper/qwlshellsurface.cpp b/src/compositor/wayland_wrapper/qwlshellsurface.cpp
index 9b61d60ba..8762d365f 100644
--- a/src/compositor/wayland_wrapper/qwlshellsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlshellsurface.cpp
@@ -62,7 +62,8 @@ void Shell::bind_func(struct wl_client *client, void *data,
uint32_t version, uint32_t id)
{
Q_UNUSED(version);
- wl_client_add_object(client,&wl_shell_interface,&shell_interface,id,data);
+ struct wl_resource *resource = wl_resource_create(client, &wl_shell_interface, version, id);
+ wl_resource_set_implementation(resource, &shell_interface, data, 0);
}
ShellSurfacePopupGrabber *Shell::getPopupGrabber(InputDevice *input)
diff --git a/src/compositor/wayland_wrapper/qwlsubsurface.cpp b/src/compositor/wayland_wrapper/qwlsubsurface.cpp
index 145f86ab8..82ecbcfe4 100644
--- a/src/compositor/wayland_wrapper/qwlsubsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlsubsurface.cpp
@@ -50,16 +50,18 @@ namespace QtWayland {
SubSurfaceExtensionGlobal::SubSurfaceExtensionGlobal(Compositor *compositor)
: m_compositor(compositor)
{
- wl_display_add_global(m_compositor->wl_display(),
- &qt_sub_surface_extension_interface,
- this,
- SubSurfaceExtensionGlobal::bind_func);
+ wl_global_create(m_compositor->wl_display(),
+ &qt_sub_surface_extension_interface,
+ qt_sub_surface_extension_interface.version,
+ this,
+ SubSurfaceExtensionGlobal::bind_func);
}
void SubSurfaceExtensionGlobal::bind_func(wl_client *client, void *data, uint32_t version, uint32_t id)
{
Q_UNUSED(version);
- wl_client_add_object(client, &qt_sub_surface_extension_interface,&sub_surface_extension_interface,id,data);
+ struct wl_resource *resource = wl_resource_create(client, &qt_sub_surface_extension_interface,version,id);
+ wl_resource_set_implementation(resource, &sub_surface_extension_interface, data, 0);
}
void SubSurfaceExtensionGlobal::get_sub_surface_aware_surface(wl_client *client, wl_resource *sub_surface_extension_resource, uint32_t id, wl_resource *surface_resource)
@@ -78,11 +80,8 @@ SubSurface::SubSurface(wl_client *client, uint32_t id, Surface *surface)
, m_parent(0)
{
surface->setSubSurface(this);
- m_sub_surface_resource = wl_client_add_object(client,
- &qt_sub_surface_interface,
- &sub_surface_interface,
- id,
- this);
+ m_sub_surface_resource = wl_resource_create(client, &qt_sub_surface_interface, qt_sub_surface_interface.version, id);
+ wl_resource_set_implementation(m_sub_surface_resource, &sub_surface_interface, this, 0);
}
SubSurface::~SubSurface()
diff --git a/src/compositor/wayland_wrapper/qwlsurface.cpp b/src/compositor/wayland_wrapper/qwlsurface.cpp
index 1d01667b3..79b83ab7e 100644
--- a/src/compositor/wayland_wrapper/qwlsurface.cpp
+++ b/src/compositor/wayland_wrapper/qwlsurface.cpp
@@ -59,7 +59,7 @@
#include <wayland-server.h>
#ifdef QT_COMPOSITOR_WAYLAND_GL
-#include "hardware_integration/qwaylandclientbufferintegration.h"
+#include "hardware_integration/qwlclientbufferintegration_p.h"
#include <qpa/qplatformopenglcontext.h>
#endif
@@ -175,7 +175,7 @@ bool Surface::isYInverted() const
{
bool ret = false;
static bool negateReturn = qgetenv("QT_COMPOSITOR_NEGATE_INVERTED_Y").toInt();
- QWaylandClientBufferIntegration *clientBufferIntegration = m_compositor->clientBufferIntegration();
+ ClientBufferIntegration *clientBufferIntegration = m_compositor->clientBufferIntegration();
#ifdef QT_COMPOSITOR_WAYLAND_GL
SurfaceBuffer *surfacebuffer = currentSurfaceBuffer();
@@ -193,7 +193,7 @@ bool Surface::isYInverted() const
bool Surface::visible() const
{
SurfaceBuffer *surfacebuffer = currentSurfaceBuffer();
- return surfacebuffer ? surfacebuffer->waylandBufferHandle() : 0;
+ return surfacebuffer ? bool(surfacebuffer->waylandBufferHandle()) : false;
}
QPointF Surface::pos() const
@@ -479,7 +479,7 @@ void Surface::surface_damage(Resource *, int32_t x, int32_t y, int32_t width, in
void Surface::surface_frame(Resource *resource, uint32_t callback)
{
- struct wl_resource *frame_callback = wl_client_add_object(resource->client(), &wl_callback_interface, 0, callback, this);
+ struct wl_resource *frame_callback = wl_resource_create(resource->client(), &wl_callback_interface, wl_callback_interface.version, callback);
m_pendingFrameCallbacks << new FrameCallback(this, frame_callback);
}
diff --git a/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp b/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp
index f877631b7..1d919cdfb 100644
--- a/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp
+++ b/src/compositor/wayland_wrapper/qwlsurfacebuffer.cpp
@@ -44,7 +44,7 @@
#include "qwlcompositor_p.h"
#ifdef QT_COMPOSITOR_WAYLAND_GL
-#include "hardware_integration/qwaylandclientbufferintegration.h"
+#include "hardware_integration/qwlclientbufferintegration_p.h"
#include <qpa/qplatformopenglcontext.h>
#endif
@@ -111,7 +111,7 @@ void SurfaceBuffer::destructBufferState()
delete static_cast<QImage *>(m_handle);
#ifdef QT_COMPOSITOR_WAYLAND_GL
} else {
- QWaylandClientBufferIntegration *hwIntegration = m_compositor->clientBufferIntegration();
+ ClientBufferIntegration *hwIntegration = m_compositor->clientBufferIntegration();
hwIntegration->unlockNativeBuffer(m_handle, 0);
#endif
}
@@ -133,7 +133,7 @@ QSize SurfaceBuffer::size() const
m_size = QSize(wl_shm_buffer_get_width(m_shmBuffer), wl_shm_buffer_get_height(m_shmBuffer));
#ifdef QT_COMPOSITOR_WAYLAND_GL
} else {
- QWaylandClientBufferIntegration *hwIntegration = m_compositor->clientBufferIntegration();
+ ClientBufferIntegration *hwIntegration = m_compositor->clientBufferIntegration();
m_size = hwIntegration->bufferSize(m_buffer);
#endif
}
@@ -190,7 +190,7 @@ void SurfaceBuffer::destroyTexture()
#ifdef QT_COMPOSITOR_WAYLAND_GL
if (m_texture) {
Q_ASSERT(QOpenGLContext::currentContext());
- QWaylandClientBufferIntegration *hwIntegration = m_compositor->clientBufferIntegration();
+ ClientBufferIntegration *hwIntegration = m_compositor->clientBufferIntegration();
if (hwIntegration->textureForBuffer(m_buffer) == 0)
glDeleteTextures(1, &m_texture);
else
@@ -226,7 +226,7 @@ void *SurfaceBuffer::handle() const
that->m_handle = image;
#ifdef QT_COMPOSITOR_WAYLAND_GL
} else {
- QWaylandClientBufferIntegration *clientBufferIntegration = m_compositor->clientBufferIntegration();
+ ClientBufferIntegration *clientBufferIntegration = m_compositor->clientBufferIntegration();
that->m_handle = clientBufferIntegration->lockNativeBuffer(m_buffer, 0);
#endif
}
@@ -270,7 +270,7 @@ void SurfaceBuffer::destroy_listener_callback(wl_listener *listener, void *data)
void SurfaceBuffer::createTexture()
{
- QWaylandClientBufferIntegration *hwIntegration = m_compositor->clientBufferIntegration();
+ ClientBufferIntegration *hwIntegration = m_compositor->clientBufferIntegration();
#ifdef QT_COMPOSITOR_WAYLAND_GL
if (!m_texture)
m_texture = hwIntegration->textureForBuffer(m_buffer);
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp
index 8d4a99b97..1ebcdde13 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.cpp
@@ -64,6 +64,7 @@ void QWaylandXCompositeEGLContext::swapBuffers(QPlatformSurface *surface)
QSize size = w->geometry().size();
+ w->attach(w->buffer(), 0, 0);
w->damage(QRect(QPoint(), size));
w->commit();
w->waitForFrameSync();
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
index 3d19dbe3f..01d632411 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.cpp
@@ -131,7 +131,6 @@ void QWaylandXCompositeEGLWindow::createEglSurface()
m_buffer = new QWaylandXCompositeBuffer(m_glxIntegration->waylandXComposite(),
(uint32_t)m_xWindow,
size);
- attach(m_buffer, 0, 0);
}
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
index 6bba18a14..b45beaa24 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
@@ -60,6 +60,8 @@ public:
EGLSurface eglSurface() const;
+ QWaylandBuffer *buffer() { return m_buffer; }
+
private:
void createEglSurface();
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
index 6854dc3b2..4ee022607 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp
@@ -50,11 +50,21 @@
QT_BEGIN_NAMESPACE
QWaylandXCompositeGLXContext::QWaylandXCompositeGLXContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, Display *display, int screen)
- : m_display(display)
+ : m_display(display),
+ m_format(format)
{
qDebug("creating XComposite-GLX context");
+
+ if (m_format.renderableType() == QSurfaceFormat::DefaultRenderableType)
+ m_format.setRenderableType(QSurfaceFormat::OpenGL);
+
+ if (m_format.renderableType() != QSurfaceFormat::OpenGL) {
+ qWarning("Unsupported renderable type");
+ return;
+ }
+
GLXContext shareContext = share ? static_cast<QWaylandXCompositeGLXContext *>(share)->m_context : 0;
- GLXFBConfig config = qglx_findConfig(display, screen, format, GLX_WINDOW_BIT | GLX_PIXMAP_BIT);
+ GLXFBConfig config = qglx_findConfig(display, screen, m_format, GLX_WINDOW_BIT | GLX_PIXMAP_BIT);
XVisualInfo *visualInfo = glXGetVisualFromFBConfig(display, config);
m_context = glXCreateContext(display, visualInfo, shareContext, true);
qglx_surfaceFormatFromGLXFBConfig(&m_format, display, config, m_context);
@@ -80,6 +90,7 @@ void QWaylandXCompositeGLXContext::swapBuffers(QPlatformSurface *surface)
glXSwapBuffers(m_display, w->xWindow());
+ w->attach(w->buffer(), 0, 0);
w->damage(QRect(QPoint(), size));
w->commit();
w->waitForFrameSync();
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
index c826a7870..174629159 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
@@ -82,7 +82,7 @@ public:
int screen() const;
Window rootWindow() const;
- bool supportsThreadedOpenGL() const { return true; }
+ bool supportsThreadedOpenGL() const { return false; }
private:
QWaylandDisplay *mWaylandDisplay;
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp
index 3a64961f1..f33790f33 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.cpp
@@ -118,7 +118,6 @@ void QWaylandXCompositeGLXWindow::createSurface()
m_buffer = new QWaylandXCompositeBuffer(m_glxIntegration->waylandXComposite(),
(uint32_t)m_xWindow,
size);
- attach(m_buffer, 0, 0);
}
QT_END_NAMESPACE
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h
index 5c649f42f..9866ad039 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h
@@ -62,6 +62,8 @@ public:
Window xWindow() const;
+ QWaylandBuffer *buffer() { return m_buffer; }
+
private:
void createSurface();
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
index a0be625dd..66533fecb 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.cpp
@@ -76,7 +76,7 @@ public:
};
BrcmEglIntegration::BrcmEglIntegration()
- : QWaylandClientBufferIntegration()
+ : QtWayland::ClientBufferIntegration()
, QtWaylandServer::qt_brcm()
, d_ptr(new BrcmEglIntegrationPrivate)
{
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
index 25c5ab71e..dca3fb667 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
@@ -41,7 +41,7 @@
#ifndef BRCMEGLINTEGRATION_H
#define BRCMEGLINTEGRATION_H
-#include <QtCompositor/qwaylandclientbufferintegration.h>
+#include <QtCompositor/private/qwlclientbufferintegration_p.h>
#include "qwayland-server-brcm.h"
#include <QtCore/QScopedPointer>
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
class BrcmEglIntegrationPrivate;
-class BrcmEglIntegration : public QWaylandClientBufferIntegration, public QtWaylandServer::qt_brcm
+class BrcmEglIntegration : public QtWayland::ClientBufferIntegration, public QtWaylandServer::qt_brcm
{
Q_DECLARE_PRIVATE(BrcmEglIntegration)
public:
diff --git a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp
index 9c7440dc6..09588f6ff 100644
--- a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.cpp
@@ -44,8 +44,8 @@
QT_BEGIN_NAMESPACE
-DrmEglServerBuffer::DrmEglServerBuffer(DrmEglServerBufferIntegration *integration, const QSize &size, QWaylandServerBuffer::Format format)
- : QWaylandServerBuffer(size,format)
+DrmEglServerBuffer::DrmEglServerBuffer(DrmEglServerBufferIntegration *integration, const QSize &size, QtWayland::ServerBuffer::Format format)
+ : QtWayland::ServerBuffer(size,format)
, m_integration(integration)
{
m_format = format;
@@ -169,12 +169,12 @@ void DrmEglServerBufferIntegration::initializeHardware(QWaylandCompositor *compo
QtWaylandServer::qt_drm_egl_server_buffer::init(compositor->waylandDisplay());
}
-bool DrmEglServerBufferIntegration::supportsFormat(QWaylandServerBuffer::Format format) const
+bool DrmEglServerBufferIntegration::supportsFormat(QtWayland::ServerBuffer::Format format) const
{
switch (format) {
- case QWaylandServerBuffer::RGBA32:
+ case QtWayland::ServerBuffer::RGBA32:
return true;
- case QWaylandServerBuffer::A8:
+ case QtWayland::ServerBuffer::A8:
#ifdef EGL_DRM_BUFFER_FORMAT_A8_MESA
return true;
#else
@@ -185,7 +185,7 @@ bool DrmEglServerBufferIntegration::supportsFormat(QWaylandServerBuffer::Format
}
}
-QWaylandServerBuffer *DrmEglServerBufferIntegration::createServerBuffer(const QSize &size, QWaylandServerBuffer::Format format)
+QtWayland::ServerBuffer *DrmEglServerBufferIntegration::createServerBuffer(const QSize &size, QtWayland::ServerBuffer::Format format)
{
return new DrmEglServerBuffer(this, size, format);
}
diff --git a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
index 659b261e0..501f21d4e 100644
--- a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
+++ b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
@@ -41,7 +41,7 @@
#ifndef DRMEGLSERVERBUFFERINTEGRATION_H
#define DRMEGLSERVERBUFFERINTEGRATION_H
-#include <QtCompositor/qwaylandserverbufferintegration.h>
+#include <QtCompositor/private/qwlserverbufferintegration_p.h>
#include "qwayland-server-drm-egl-server-buffer.h"
@@ -74,10 +74,10 @@ QT_BEGIN_NAMESPACE
class DrmEglServerBufferIntegration;
-class DrmEglServerBuffer : public QWaylandServerBuffer, public QtWaylandServer::qt_server_buffer
+class DrmEglServerBuffer : public QtWayland::ServerBuffer, public QtWaylandServer::qt_server_buffer
{
public:
- DrmEglServerBuffer(DrmEglServerBufferIntegration *integration, const QSize &size, QWaylandServerBuffer::Format format);
+ DrmEglServerBuffer(DrmEglServerBufferIntegration *integration, const QSize &size, QtWayland::ServerBuffer::Format format);
struct ::wl_resource *resourceForClient(struct ::wl_client *) Q_DECL_OVERRIDE;
void bindTextureToBuffer() Q_DECL_OVERRIDE;
@@ -93,7 +93,7 @@ private:
};
class DrmEglServerBufferIntegration :
- public QWaylandServerBufferIntegration,
+ public QtWayland::ServerBufferIntegration,
public QtWaylandServer::qt_drm_egl_server_buffer
{
public:
@@ -102,8 +102,8 @@ public:
void initializeHardware(QWaylandCompositor *);
- bool supportsFormat(QWaylandServerBuffer::Format format) const Q_DECL_OVERRIDE;
- QWaylandServerBuffer *createServerBuffer(const QSize &size, QWaylandServerBuffer::Format format) Q_DECL_OVERRIDE;
+ bool supportsFormat(QtWayland::ServerBuffer::Format format) const Q_DECL_OVERRIDE;
+ QtWayland::ServerBuffer *createServerBuffer(const QSize &size, QtWayland::ServerBuffer::Format format) Q_DECL_OVERRIDE;
EGLDisplay display() const { return m_egl_display; }
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index ede8a9abf..caff5df12 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -102,7 +102,7 @@ public:
};
WaylandEglClientBufferIntegration::WaylandEglClientBufferIntegration()
- : QWaylandClientBufferIntegration()
+ : QtWayland::ClientBufferIntegration()
, d_ptr(new WaylandEglClientBufferIntegrationPrivate)
{
}
@@ -208,7 +208,7 @@ bool WaylandEglClientBufferIntegration::isYInverted(struct ::wl_resource *buffer
return true;
#endif
- return QWaylandClientBufferIntegration::isYInverted(buffer);
+ return QtWayland::ClientBufferIntegration::isYInverted(buffer);
}
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
index 94d31fc80..322911892 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
@@ -41,14 +41,14 @@
#ifndef WAYLANDEGLINTEGRATION_H
#define WAYLANDEGLINTEGRATION_H
-#include <QtCompositor/qwaylandclientbufferintegration.h>
+#include <QtCompositor/private/qwlclientbufferintegration_p.h>
#include <QtCore/QScopedPointer>
QT_BEGIN_NAMESPACE
class WaylandEglClientBufferIntegrationPrivate;
-class WaylandEglClientBufferIntegration : public QWaylandClientBufferIntegration
+class WaylandEglClientBufferIntegration : public QtWayland::ClientBufferIntegration
{
Q_DECLARE_PRIVATE(WaylandEglClientBufferIntegration)
public:
diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
index c645b997f..2401d6710 100644
--- a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
+++ b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.cpp
@@ -68,7 +68,7 @@ QVector<EGLint> eglbuildSpec()
}
XCompositeEglClientBufferIntegration::XCompositeEglClientBufferIntegration()
- : QWaylandClientBufferIntegration()
+ : QtWayland::ClientBufferIntegration()
, mDisplay(0)
{
diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
index 5497daed4..cf5acdd34 100644
--- a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
+++ b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
@@ -41,7 +41,7 @@
#ifndef XCOMPOSITEEGLINTEGRATION_H
#define XCOMPOSITEEGLINTEGRATION_H
-#include <QtCompositor/qwaylandclientbufferintegration.h>
+#include <QtCompositor/private/qwlclientbufferintegration_p.h>
#include "xlibinclude.h"
@@ -49,7 +49,7 @@
QT_BEGIN_NAMESPACE
-class XCompositeEglClientBufferIntegration : public QWaylandClientBufferIntegration
+class XCompositeEglClientBufferIntegration : public QtWayland::ClientBufferIntegration
{
public:
XCompositeEglClientBufferIntegration();
diff --git a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
index a58827cee..dce1fdc31 100644
--- a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
+++ b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.cpp
@@ -72,7 +72,7 @@ QVector<int> qglx_buildSpec()
XCompositeGLXClientBufferIntegration::XCompositeGLXClientBufferIntegration()
- : QWaylandClientBufferIntegration()
+ : QtWayland::ClientBufferIntegration()
, mDisplay(0)
, mHandler(0)
{
diff --git a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
index 5a724eedf..6d28a3de4 100644
--- a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
+++ b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
@@ -41,7 +41,7 @@
#ifndef XCOMPOSITEGLXINTEGRATION_H
#define XCOMPOSITEGLXINTEGRATION_H
-#include <QtCompositor/qwaylandclientbufferintegration.h>
+#include <QtCompositor/private/qwlclientbufferintegration_p.h>
#include "xlibinclude.h"
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
class XCompositeHandler;
-class XCompositeGLXClientBufferIntegration : public QWaylandClientBufferIntegration
+class XCompositeGLXClientBufferIntegration : public QtWayland::ClientBufferIntegration
{
public:
XCompositeGLXClientBufferIntegration();
diff --git a/src/plugins/hardwareintegration/client/brcm-egl/main.cpp b/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
index 4c8846d9c..f77b41ef0 100644
--- a/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandBrcmEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.2" FILE "brcm-egl.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3" FILE "brcm-egl.json")
public:
QStringList keys() const;
QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
index bc530a4c9..33b8b4b29 100644
--- a/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class DrmEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandServerBufferIntegrationFactoryInterface.5.2" FILE "drm-egl-server.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandServerBufferIntegrationFactoryInterface.5.3" FILE "drm-egl-server.json")
public:
QStringList keys() const;
QWaylandServerBufferIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/hardwareintegration/client/wayland-egl/main.cpp b/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
index 72cb555f8..50e956644 100644
--- a/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.2" FILE "wayland-egl.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3" FILE "wayland-egl.json")
public:
QStringList keys() const;
QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp b/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
index f6995319e..46e3eda4e 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandXCompositeEglClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.2" FILE "xcomposite-egl.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3" FILE "xcomposite-egl.json")
public:
QStringList keys() const;
QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp b/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
index 4269a9c26..f53caf03a 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
+++ b/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QWaylandXCompositeGlxClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.2" FILE "xcomposite-glx.json")
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.WaylandClient.QWaylandClientBufferIntegrationFactoryInterface.5.3" FILE "xcomposite-glx.json")
public:
QStringList keys() const;
QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
diff --git a/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp b/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
index 312e05770..53a3f3c3e 100644
--- a/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
@@ -39,18 +39,18 @@
**
****************************************************************************/
-#include <QtCompositor/qwaylandclientbufferintegrationplugin.h>
+#include <QtCompositor/private/qwlclientbufferintegrationplugin_p.h>
#include "brcmeglintegration.h"
QT_BEGIN_NAMESPACE
-class QWaylandBrcmClientBufferIntegration : public QWaylandClientBufferIntegrationPlugin
+class QWaylandBrcmClientBufferIntegration : public QtWayland::ClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandClientBufferIntegrationFactoryInterface.5.2" FILE "brcm-egl.json")
+ Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "brcm-egl.json")
public:
QStringList keys() const;
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&);
};
QStringList QWaylandBrcmClientBufferIntegration::keys() const
@@ -60,7 +60,7 @@ QStringList QWaylandBrcmClientBufferIntegration::keys() const
return list;
}
-QWaylandClientBufferIntegration *QWaylandBrcmClientBufferIntegration::create(const QString& system, const QStringList& paramList)
+QtWayland::ClientBufferIntegration *QWaylandBrcmClientBufferIntegration::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
if (system.toLower() == "wayland-brcm")
diff --git a/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp b/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
index 768053e54..4bfc1b483 100644
--- a/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
@@ -39,18 +39,18 @@
**
****************************************************************************/
-#include <QtCompositor/qwaylandserverbufferintegrationplugin.h>
+#include <QtCompositor/private/qwlserverbufferintegrationplugin_p.h>
#include "drmeglserverbufferintegration.h"
QT_BEGIN_NAMESPACE
-class DrmEglServerBufferIntegrationPlugin : public QWaylandServerBufferIntegrationPlugin
+class DrmEglServerBufferIntegrationPlugin : public QtWayland::ServerBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandServerBufferIntegrationFactoryInterface.5.2" FILE "drm-egl-server.json")
+ Q_PLUGIN_METADATA(IID QtWaylandServerBufferIntegrationFactoryInterface_iid FILE "drm-egl-server.json")
public:
QStringList keys() const;
- QWaylandServerBufferIntegration *create(const QString&, const QStringList&);
+ QtWayland::ServerBufferIntegration *create(const QString&, const QStringList&);
};
QStringList DrmEglServerBufferIntegrationPlugin::keys() const
@@ -60,7 +60,7 @@ QStringList DrmEglServerBufferIntegrationPlugin::keys() const
return list;
}
-QWaylandServerBufferIntegration *DrmEglServerBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
+QtWayland::ServerBufferIntegration *DrmEglServerBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
if (system.toLower() == "drm-egl-server")
diff --git a/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp b/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
index 52097ecf3..274dff1e6 100644
--- a/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
@@ -39,19 +39,19 @@
**
****************************************************************************/
-#include <QtCompositor/qwaylandclientbufferintegrationfactory.h>
-#include <QtCompositor/qwaylandclientbufferintegrationplugin.h>
+#include <QtCompositor/private/qwlclientbufferintegrationfactory_p.h>
+#include <QtCompositor/private/qwlclientbufferintegrationplugin_p.h>
#include "waylandeglclientbufferintegration.h"
QT_BEGIN_NAMESPACE
-class QWaylandIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin
+class QWaylandIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandClientBufferIntegrationFactoryInterface.5.2" FILE "wayland-egl.json")
+ Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "wayland-egl.json")
public:
QStringList keys() const;
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&);
};
QStringList QWaylandIntegrationPlugin::keys() const
@@ -61,7 +61,7 @@ QStringList QWaylandIntegrationPlugin::keys() const
return list;
}
-QWaylandClientBufferIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
+QtWayland::ClientBufferIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
if (system.toLower() == "wayland-egl")
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp b/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
index 677194c1a..4ae206fa2 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
@@ -39,18 +39,18 @@
**
****************************************************************************/
-#include <QtCompositor/qwaylandclientbufferintegrationplugin.h>
+#include <QtCompositor/private/qwlclientbufferintegrationplugin_p.h>
#include "xcompositeeglintegration.h"
QT_BEGIN_NAMESPACE
-class QWaylandXCompositeClientBufferIntegration : public QWaylandClientBufferIntegrationPlugin
+class QWaylandXCompositeClientBufferIntegration : public QtWayland::ClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandClientBufferIntegrationFactoryInterface.5.2" FILE "xcomposite-egl.json")
+ Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-egl.json")
public:
QStringList keys() const;
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&);
};
QStringList QWaylandXCompositeClientBufferIntegration::keys() const
@@ -60,7 +60,7 @@ QStringList QWaylandXCompositeClientBufferIntegration::keys() const
return list;
}
-QWaylandClientBufferIntegration *QWaylandXCompositeClientBufferIntegration::create(const QString& system, const QStringList& paramList)
+QtWayland::ClientBufferIntegration *QWaylandXCompositeClientBufferIntegration::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
if (system.toLower() == "wayland-xcomposite")
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp b/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
index 3cb8dee9b..4dcd9136f 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
@@ -39,18 +39,18 @@
**
****************************************************************************/
-#include <QtCompositor/qwaylandclientbufferintegrationplugin.h>
+#include <QtCompositor/private/qwlclientbufferintegrationplugin_p.h>
#include "xcompositeglxintegration.h"
QT_BEGIN_NAMESPACE
-class QWaylandXCompositeClientBufferIntegration : public QWaylandClientBufferIntegrationPlugin
+class QWaylandXCompositeClientBufferIntegration : public QtWayland::ClientBufferIntegrationPlugin
{
Q_OBJECT
- Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Compositor.QWaylandClientBufferIntegrationFactoryInterface.5.2" FILE "xcomposite-glx.json")
+ Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-glx.json")
public:
QStringList keys() const;
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&);
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&);
};
QStringList QWaylandXCompositeClientBufferIntegration::keys() const
@@ -60,7 +60,7 @@ QStringList QWaylandXCompositeClientBufferIntegration::keys() const
return list;
}
-QWaylandClientBufferIntegration *QWaylandXCompositeClientBufferIntegration::create(const QString& system, const QStringList& paramList)
+QtWayland::ClientBufferIntegration *QWaylandXCompositeClientBufferIntegration::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
if (system.toLower() == "wayland-xcomposite-glx")
diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp
index 48a71a560..097813f3c 100644
--- a/src/qtwaylandscanner/qtwaylandscanner.cpp
+++ b/src/qtwaylandscanner/qtwaylandscanner.cpp
@@ -606,7 +606,7 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr
printf(" void %s::init(struct ::wl_display *display)\n", interfaceName);
printf(" {\n");
- printf(" m_global = wl_display_add_global(display, &::%s_interface, this, bind_func);\n", interfaceName);
+ printf(" m_global = wl_global_create(display, &::%s_interface, ::%s_interface.version, this, bind_func);\n", interfaceName, interfaceName);
printf(" }\n");
printf("\n");
@@ -657,9 +657,9 @@ void process(QXmlStreamReader &xml, const QByteArray &headerPath, const QByteArr
printf(" Resource *resource = %s_allocate();\n", interfaceNameStripped);
printf(" resource->%s = this;\n", interfaceNameStripped);
printf("\n");
- printf(" struct ::wl_resource *handle = id != 0 ? wl_client_add_object(client, &::%s_interface, %s, id, resource) : wl_client_new_object(client, &::%s_interface, %s, resource);\n", interfaceName, interfaceMember.constData(), interfaceName, interfaceMember.constData());
+ printf(" struct ::wl_resource *handle = wl_resource_create(client, &::%s_interface, ::%s_interface.version, id);\n", interfaceName, interfaceName);
+ printf(" wl_resource_set_implementation(handle, %s, resource, destroy_func);", interfaceMember.constData());
printf("\n");
- printf(" handle->destroy = destroy_func;\n");
printf(" resource->handle = handle;\n");
printf(" %s_bind_resource(resource);\n", interfaceNameStripped);
printf(" return resource;\n");
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 5e6056181..1d7d930c9 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -1,8 +1,8 @@
TEMPLATE=subdirs
-SUBDIRS=client
#Only build compositor test when we are
#building QtCompositor
contains(CONFIG, wayland-compositor) {
SUBDIRS += compositor
+ SUBDIRS += client
}