summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README88
-rw-r--r--examples/examples.pro6
-rw-r--r--examples/qml-compositor/main.cpp4
-rw-r--r--examples/qml-compositor/qml-compositor.pro25
-rw-r--r--examples/qwidget-compositor-mdi/main.cpp2
-rw-r--r--examples/qwidget-compositor-mdi/qt-compositor.pro20
-rw-r--r--examples/qwidget-compositor/qwidget-compositor.pro15
-rw-r--r--examples/qwindow-compositor/qwindow-compositor.pro16
-rw-r--r--examples/qwindow-compositor/surfacerenderer.cpp11
-rw-r--r--examples/qwindow-compositor/surfacerenderer.h4
-rw-r--r--modules/qt_compositor.pri19
-rw-r--r--qtwayland.pro14
-rw-r--r--src/compositor/compositor.pri (renamed from src/qt-compositor/qt-compositor.pri)6
-rw-r--r--src/compositor/compositor.pro10
-rw-r--r--src/compositor/compositor_api/compositor_api.pri (renamed from src/qt-compositor/compositor_api/compositor_api.pri)13
-rw-r--r--src/compositor/compositor_api/waylandcompositor.cpp (renamed from src/qt-compositor/compositor_api/waylandcompositor.cpp)0
-rw-r--r--src/compositor/compositor_api/waylandcompositor.h (renamed from src/qt-compositor/compositor_api/waylandcompositor.h)2
-rw-r--r--src/compositor/compositor_api/waylandsurface.cpp (renamed from src/qt-compositor/compositor_api/waylandsurface.cpp)0
-rw-r--r--src/compositor/compositor_api/waylandsurface.h (renamed from src/qt-compositor/compositor_api/waylandsurface.h)2
-rw-r--r--src/compositor/compositor_api/waylandsurfaceitem.cpp (renamed from src/qt-compositor/compositor_api/waylandsurfaceitem.cpp)8
-rw-r--r--src/compositor/compositor_api/waylandsurfaceitem.h (renamed from src/qt-compositor/compositor_api/waylandsurfaceitem.h)4
-rw-r--r--src/compositor/hardware_integration/dri2_xcb/README (renamed from src/qt-compositor/hardware_integration/dri2_xcb/README)0
-rw-r--r--src/compositor/hardware_integration/dri2_xcb/dri2_xcb.pri (renamed from src/qt-compositor/hardware_integration/dri2_xcb/dri2_xcb.pri)0
-rw-r--r--src/compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.cpp (renamed from src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.cpp)0
-rw-r--r--src/compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.h (renamed from src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.h)0
-rw-r--r--src/compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.cpp (renamed from src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.cpp)0
-rw-r--r--src/compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.h (renamed from src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.h)0
-rw-r--r--src/compositor/hardware_integration/graphicshardwareintegration.cpp (renamed from src/qt-compositor/hardware_integration/graphicshardwareintegration.cpp)0
-rw-r--r--src/compositor/hardware_integration/graphicshardwareintegration.h (renamed from src/qt-compositor/hardware_integration/graphicshardwareintegration.h)0
-rw-r--r--src/compositor/hardware_integration/hardware_integration.pri (renamed from src/qt-compositor/hardware_integration/hardware_integration.pri)14
-rw-r--r--src/compositor/hardware_integration/wayland_egl/wayland_egl.pri (renamed from src/qt-compositor/hardware_integration/wayland_egl/wayland_egl.pri)0
-rw-r--r--src/compositor/hardware_integration/wayland_egl/waylandeglintegration.cpp (renamed from src/qt-compositor/hardware_integration/wayland_egl/waylandeglintegration.cpp)0
-rw-r--r--src/compositor/hardware_integration/wayland_egl/waylandeglintegration.h (renamed from src/qt-compositor/hardware_integration/wayland_egl/waylandeglintegration.h)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_egl/xcomposite_egl.pri (renamed from src/qt-compositor/hardware_integration/xcomposite_egl/xcomposite_egl.pri)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp (renamed from src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.h (renamed from src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.h)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_glx/xcomposite_glx.pri (renamed from src/qt-compositor/hardware_integration/xcomposite_glx/xcomposite_glx.pri)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp (renamed from src/qt-compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.h (renamed from src/qt-compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.h)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/protocol/wayland-xcomposite.xml (renamed from src/qt-compositor/hardware_integration/xcomposite_share/protocol/wayland-xcomposite.xml)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/wayland-xcomposite-client-protocol.h (renamed from src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-client-protocol.h)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/wayland-xcomposite-protocol.c (renamed from src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-protocol.c)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/wayland-xcomposite-server-protocol.h (renamed from src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-server-protocol.h)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/xcomposite_share.pri (renamed from src/qt-compositor/hardware_integration/xcomposite_share/xcomposite_share.pri)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.cpp (renamed from src/qt-compositor/hardware_integration/xcomposite_share/xcompositebuffer.cpp)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.h (renamed from src/qt-compositor/hardware_integration/xcomposite_share/xcompositebuffer.h)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp (renamed from src/qt-compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/xcompositehandler.h (renamed from src/qt-compositor/hardware_integration/xcomposite_share/xcompositehandler.h)0
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/xlibinclude.h (renamed from src/qt-compositor/hardware_integration/xcomposite_share/xlibinclude.h)0
-rw-r--r--src/compositor/util/util.pri (renamed from src/qt-compositor/util/util.pri)0
-rw-r--r--src/compositor/util/waylandobject.h (renamed from src/qt-compositor/util/waylandobject.h)0
-rw-r--r--src/compositor/wayland_wrapper/wayland_wrapper.pri (renamed from src/qt-compositor/wayland_wrapper/wayland_wrapper.pri)0
-rw-r--r--src/compositor/wayland_wrapper/wlcompositor.cpp (renamed from src/qt-compositor/wayland_wrapper/wlcompositor.cpp)0
-rw-r--r--src/compositor/wayland_wrapper/wlcompositor.h (renamed from src/qt-compositor/wayland_wrapper/wlcompositor.h)0
-rw-r--r--src/compositor/wayland_wrapper/wldatadevice.cpp (renamed from src/qt-compositor/wayland_wrapper/wldatadevice.cpp)0
-rw-r--r--src/compositor/wayland_wrapper/wldatadevice.h (renamed from src/qt-compositor/wayland_wrapper/wldatadevice.h)0
-rw-r--r--src/compositor/wayland_wrapper/wldatadevicemanager.cpp (renamed from src/qt-compositor/wayland_wrapper/wldatadevicemanager.cpp)0
-rw-r--r--src/compositor/wayland_wrapper/wldatadevicemanager.h (renamed from src/qt-compositor/wayland_wrapper/wldatadevicemanager.h)0
-rw-r--r--src/compositor/wayland_wrapper/wldataoffer.cpp (renamed from src/qt-compositor/wayland_wrapper/wldataoffer.cpp)0
-rw-r--r--src/compositor/wayland_wrapper/wldataoffer.h (renamed from src/qt-compositor/wayland_wrapper/wldataoffer.h)0
-rw-r--r--src/compositor/wayland_wrapper/wldatasource.cpp (renamed from src/qt-compositor/wayland_wrapper/wldatasource.cpp)0
-rw-r--r--src/compositor/wayland_wrapper/wldatasource.h (renamed from src/qt-compositor/wayland_wrapper/wldatasource.h)0
-rw-r--r--src/compositor/wayland_wrapper/wldisplay.cpp (renamed from src/qt-compositor/wayland_wrapper/wldisplay.cpp)0
-rw-r--r--src/compositor/wayland_wrapper/wldisplay.h (renamed from src/qt-compositor/wayland_wrapper/wldisplay.h)0
-rw-r--r--src/compositor/wayland_wrapper/wlinputdevice.cpp (renamed from src/qt-compositor/wayland_wrapper/wlinputdevice.cpp)0
-rw-r--r--src/compositor/wayland_wrapper/wlinputdevice.h (renamed from src/qt-compositor/wayland_wrapper/wlinputdevice.h)0
-rw-r--r--src/compositor/wayland_wrapper/wloutput.cpp (renamed from src/qt-compositor/wayland_wrapper/wloutput.cpp)0
-rw-r--r--src/compositor/wayland_wrapper/wloutput.h (renamed from src/qt-compositor/wayland_wrapper/wloutput.h)0
-rw-r--r--src/compositor/wayland_wrapper/wlshell.cpp (renamed from src/qt-compositor/wayland_wrapper/wlshell.cpp)0
-rw-r--r--src/compositor/wayland_wrapper/wlshell.h (renamed from src/qt-compositor/wayland_wrapper/wlshell.h)0
-rw-r--r--src/compositor/wayland_wrapper/wlshmbuffer.cpp (renamed from src/qt-compositor/wayland_wrapper/wlshmbuffer.cpp)0
-rw-r--r--src/compositor/wayland_wrapper/wlshmbuffer.h (renamed from src/qt-compositor/wayland_wrapper/wlshmbuffer.h)0
-rw-r--r--src/compositor/wayland_wrapper/wlsurface.cpp (renamed from src/qt-compositor/wayland_wrapper/wlsurface.cpp)0
-rw-r--r--src/compositor/wayland_wrapper/wlsurface.h (renamed from src/qt-compositor/wayland_wrapper/wlsurface.h)0
-rw-r--r--src/compositor/windowmanagerprotocol/wayland-windowmanager-protocol.c (renamed from src/qt-compositor/windowmanagerprotocol/wayland-windowmanager-protocol.c)0
-rw-r--r--src/compositor/windowmanagerprotocol/wayland-windowmanager-server-protocol.h (renamed from src/qt-compositor/windowmanagerprotocol/wayland-windowmanager-server-protocol.h)0
-rw-r--r--src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp (renamed from src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp)0
-rw-r--r--src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration.h (renamed from src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.h)0
-rw-r--r--src/compositor/windowmanagerprotocol/windowmanager.xml (renamed from src/qt-compositor/windowmanagerprotocol/windowmanager.xml)0
-rw-r--r--src/compositor/windowmanagerprotocol/windowmanagerprotocol.pri (renamed from src/qt-compositor/windowmanagerprotocol/windowmanagerprotocol.pri)0
-rw-r--r--src/plugins/platforms/platforms.pro2
-rw-r--r--src/plugins/platforms/wayland/gl_integration/gl_integration.pri10
-rw-r--r--src/plugins/platforms/wayland/wayland.pro3
-rw-r--r--src/plugins/plugins.pro2
-rw-r--r--src/qt-compositor/qt-compositor.pro15
-rw-r--r--src/src.pro2
-rw-r--r--sync.profile24
87 files changed, 155 insertions, 186 deletions
diff --git a/README b/README
index ce4bc7cad..3247a2547 100644
--- a/README
+++ b/README
@@ -1,87 +1,5 @@
-This document is heavily inspired by the Building Wayland document:
-http://wayland.freedesktop.org/building.html
+This is the Qt for Wayland module.
-However, it is slightly more messy
-:) If you encounter things you find unclear, and know of a better way of
-expressing it, then please send a patch:)
+Sometimes we are slightly behind upstream wayland, so if your compiling Wayland from git, reset to sha1 defined in wayland_sha1.txt
-Qt-Compositor is meant as a toolbox for making new funky Wayland compositors.
-
-Pre-requisites on Linux (apt-get): git, autoconf, automake, libtool, libexpat1-dev
-Pre-requisites on Mac OSX Snow Leopard: git, latest Gnu autoconf, latest Gnu automake, latest Gnu libtool, latest pkg-config.
-Make sure you have /usr/local/bin on the $PATH before /usr/bin
-
-1. To build wayland we need libffi + libffi headers on Linux. For Mac we need a special version of wayland/event-loop.c -- if you pull the distribution from the freedesktop.org, replace the event-loop.c with the one in this repo
-
-# sudo apt-get install libffi-dev
-On Mac ffi is part of the OS but you need to tell the the wayland configure
-export FFI_CFLAGS=-I/usr/include/ffi
-export FFI_LIBS-lffi
-
-Qt-Compositor contains a copy of the Wayland libraries. We have not changed
-them in any way, but they are provided for convenience so that you can compile
-everything using qmake. However, I suggest you use the official Wayland
-libraries. The only dependency they have is to ffi. The demos has some more
-dependencies, but we are not going to compile those.
-
-2. Clone Wayland from: git://anongit.freedesktop.org/wayland/wayland
-# git clone git://anongit.freedesktop.org/wayland/wayland
-
-3. Compile Wayland: ./autogen.sh -prefix=$HOME/install && make && make install
-
-4. Set your PKG_CONFIG_PATH so that the location of the Wayland libraries are
-picked up by Qt's configure.
-# export PKG_CONFIG_PATH=$HOME/install/lib/pkgconfig/
-
-6. Set the library path to pick up the Wayland libraries
-# export LD_LIBRARY_PATH=$HOME/install/lib
-
-8. Get the build dependencies that you need for QtGui.
-# sudo apt-get build-dep libqt4-gui
-
-One of the dependencies that the wayland-demos compositor and client
-applications has is xkbcommon. The Qt-Lighthouse wayland plugin has code to
-read xkbcommon codes sent over the wayland protocol, so that Qt-Lighthouse
-clients on Wayland will get keyboard functionality in other compositors.
-However, Qt-Compositor doesn't have this requirement. The support for xkbcommon
-is picked up by configure. If it is not detected the Wayland plug-in will be
-compiled with the: QT_NO_WAYLAND_XKB.
-
-libxkbcommon is available from: git://people.freedesktop.org/xorg/lib/libxkbcommon.git
-Use typically the following line to configure it:
-# ./autogen.sh --prefix=$HOME/install --with-xkb-config-root=/usr/share/X11/xkb
-
-Its a good idea to use out of source builds when building Qt. A good setup
-could be: $HOME/dev/qt-src/lighthouse where lighthouse is where you have a
-complete checkout of the lighthouse repository. Then you can have ie.:
-$HOME/dev/qt-builds/lighthouse-debug
-
-9. Clone Lighthouse from gitorious
-# git clone git@gitorious.org:+qt-developers/qt/lighthouse.git
-# $HOME/dev/qt-src/lighthouse
-(you might want to use git remote etc. if you already have a clone of
-qt-master)
-
-10. Configure and compile Qt-Lighthouse. So from
-$HOME/dev/qt-builds/lighthouse-debug do: ../../qt-src/lighthouse/configure -qpa
--developer-build && make
-
-11. OK, now we have Lighthouse and Wayland libs on our system. To try Wayland
-out we want the compositor to render into a XWindow(this is for development).
-So we need to compile up a X back-end for lighthouse. They don't get built
-automatically (yet). The Wayland plug-in will be ma
-
-Go into the directory: $HOME/dev/qt-src/lighthouse/src/plugins/platforms/xcb
-# make
-
-12. When this is done, you are ready to compile the qwidget-compositor. Enter
-the directory with $QT-COMPOSITOR-DIR/examples/qwidget-compositor #qmake &&
-make
-
-Makes generates a executable in $QT-COMPOSITOR-DIR/bin. Execute it and pass in
--platform xcb
-# $QT-COMPOSITOR-DIR/bin/qt-compositor -platform xcb
-
-This should give you a blank window. If you now open a another terminal with
-LD_LIBRARY_PATH set and run a simple Qt example with the -platform Wayland, it
-should render into this window.
+We hang out at #qt-labs and #qt-lighthouse on freenode if you have any questions
diff --git a/examples/examples.pro b/examples/examples.pro
new file mode 100644
index 000000000..5c75789fa
--- /dev/null
+++ b/examples/examples.pro
@@ -0,0 +1,6 @@
+TEMPLATE=subdirs
+SUBDIRS += qwidget-compositor qwidget-compositor-mdi qwindow-compositor
+
+contains(QT_CONFIG, quick) {
+ SUBDIRS += qml-compositor
+}
diff --git a/examples/qml-compositor/main.cpp b/examples/qml-compositor/main.cpp
index 7f2d47bed..0bd09434c 100644
--- a/examples/qml-compositor/main.cpp
+++ b/examples/qml-compositor/main.cpp
@@ -42,7 +42,7 @@
#include "waylandsurface.h"
#include "waylandsurfaceitem.h"
-#include <QApplication>
+#include <QGuiApplication>
#include <QTimer>
#include <QPainter>
#include <QMouseEvent>
@@ -117,7 +117,7 @@ private:
int main(int argc, char *argv[])
{
- QApplication app(argc, argv);
+ QGuiApplication app(argc, argv);
QmlCompositor compositor;
compositor.setWindowTitle(QLatin1String("QML Compositor"));
diff --git a/examples/qml-compositor/qml-compositor.pro b/examples/qml-compositor/qml-compositor.pro
index aea2fdce2..0295dedcb 100644
--- a/examples/qml-compositor/qml-compositor.pro
+++ b/examples/qml-compositor/qml-compositor.pro
@@ -6,24 +6,13 @@ INCLUDEPATH += .
# comment out the following to not use pkg-config in the pri files
CONFIG += use_pkgconfig
-DESTDIR=$$PWD/../../bin/
-
LIBS += -L ../../lib
-QT += declarative v8
-QT += opengl
-
-# to be removed once scenegraph gets rid of its widget dependencies
-#QT += widgets widgets-private
-
-!isEmpty(QT.core.MAJOR_VERSION):greaterThan(QT.core.MAJOR_VERSION, 4) {
- QT += core-private gui-private declarative-private opengl-private
-}
+QT += quick v8
+QT += quick-private
-include (../../src/qt-compositor/qt-compositor.pri)
-
-target.path += $$[QT_INSTALL_BINS]
-INSTALLS += target
+QT += compositor
+#include (../../src/compositor/compositor.pri)
# Input
SOURCES += main.cpp
@@ -32,3 +21,9 @@ RESOURCES = qml-compositor.qrc
CONFIG += qt warn_on debug create_prl link_prl
OBJECTS_DIR = .obj/release-shared
MOC_DIR = .moc/release-shared
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qml-compositor
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qml-compositor.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qml-compositor
+INSTALLS += target sources
diff --git a/examples/qwidget-compositor-mdi/main.cpp b/examples/qwidget-compositor-mdi/main.cpp
index 752014a32..062669db4 100644
--- a/examples/qwidget-compositor-mdi/main.cpp
+++ b/examples/qwidget-compositor-mdi/main.cpp
@@ -172,7 +172,7 @@ class QWidgetCompositorMdi : public QMainWindow, public WaylandCompositor
{
Q_OBJECT
public:
- QWidgetCompositorMdi() : WaylandCompositor(this) {
+ QWidgetCompositorMdi() : WaylandCompositor(this->windowHandle()) {
m_mdiArea = new QMdiArea(this);
setCentralWidget(m_mdiArea);
diff --git a/examples/qwidget-compositor-mdi/qt-compositor.pro b/examples/qwidget-compositor-mdi/qt-compositor.pro
deleted file mode 100644
index 3cd110be4..000000000
--- a/examples/qwidget-compositor-mdi/qt-compositor.pro
+++ /dev/null
@@ -1,20 +0,0 @@
-TEMPLATE = app
-TARGET = qwidget-compositor-mdi
-DEPENDPATH += .
-INCLUDEPATH += .
-
-# comment out the following to not use pkg-config in the pri files
-CONFIG += use_pkgconfig
-
-DESTDIR=$$PWD/../../bin/
-
-include (../../src/qt-compositor/qt-compositor.pri)
-
-QT += widgets gui-private widgets-private
-
-# Input
-SOURCES += main.cpp
-
-CONFIG += qt warn_on debug create_prl link_prl
-OBJECTS_DIR = .obj/release-shared
-MOC_DIR = .moc/release-shared
diff --git a/examples/qwidget-compositor/qwidget-compositor.pro b/examples/qwidget-compositor/qwidget-compositor.pro
index 98bcb0c4f..409930a43 100644
--- a/examples/qwidget-compositor/qwidget-compositor.pro
+++ b/examples/qwidget-compositor/qwidget-compositor.pro
@@ -6,9 +6,7 @@ INCLUDEPATH += .
# comment out the following to not use pkg-config in the pri files
CONFIG += use_pkgconfig
-DESTDIR=$$PWD/../../bin/
-
-include (../../src/qt-compositor/qt-compositor.pri)
+#include (../../src/qt-compositor/qt-compositor.pri)
# Input
SOURCES += main.cpp
@@ -23,12 +21,17 @@ isEmpty(QT_SOURCE_TREE) {
} else {
QTBASE = $$QT_SOURCE_TREE
}
+
#TOUCHSCREEN_BASE = $$QTBASE/src/plugins/generic/touchscreen
#SOURCES += $$TOUCHSCREEN_BASE/qtouchscreen.cpp
#HEADERS += $$TOUCHSCREEN_BASE/qtouchscreen.h
#INCLUDEPATH += $$TOUCHSCREEN_BASE
#LIBS += -ludev -lmtdev
-QT += gui-private widgets widgets-private opengl opengl-private
-target.path += $$[QT_INSTALL_DATA]/bin
-INSTALLS += target
+QT += gui-private widgets widgets-private opengl opengl-private compositor
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qwidget-compositor
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qwidget-compositor.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qwidget-compositor
+INSTALLS += target sources
diff --git a/examples/qwindow-compositor/qwindow-compositor.pro b/examples/qwindow-compositor/qwindow-compositor.pro
index 79f318a46..e154ad96e 100644
--- a/examples/qwindow-compositor/qwindow-compositor.pro
+++ b/examples/qwindow-compositor/qwindow-compositor.pro
@@ -6,10 +6,8 @@ INCLUDEPATH += .
# comment out the following to not use pkg-config in the pri files
CONFIG += use_pkgconfig
-DESTDIR=$$PWD/../../bin/
-
LIBS += -L ../../lib
-include (../../src/qt-compositor/qt-compositor.pri)
+#include (../../src/qt-compositor/qt-compositor.pri)
# Input
SOURCES += main.cpp \
@@ -21,10 +19,10 @@ CONFIG += qt warn_on debug create_prl link_prl
OBJECTS_DIR = .obj/release-shared
MOC_DIR = .moc/release-shared
-QT += gui opengl
+QT += gui
-target.path += $$[QT_INSTALL_BINS]
-INSTALLS += target
+QT += compositor
+#include(../../src/compositor/compositor.pri)
HEADERS += \
qopenglwindow.h \
@@ -32,3 +30,9 @@ HEADERS += \
qwindowcompositor.h
RESOURCES += qwindow-compositor.qrc
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qwindow-compositor
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qwindow-compositor.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/qtwayland/qwindow-compositor
+INSTALLS += target sources
diff --git a/examples/qwindow-compositor/surfacerenderer.cpp b/examples/qwindow-compositor/surfacerenderer.cpp
index 42af69761..f160a3a0f 100644
--- a/examples/qwindow-compositor/surfacerenderer.cpp
+++ b/examples/qwindow-compositor/surfacerenderer.cpp
@@ -1,6 +1,7 @@
#include "surfacerenderer.h"
#include <QOpenGLFunctions>
+#include <QImage>
SurfaceRenderer::SurfaceRenderer(QOpenGLContext *context, QWindow *surface)
: m_context(context)
@@ -30,10 +31,10 @@ SurfaceRenderer::SurfaceRenderer(QOpenGLContext *context, QWindow *surface)
glBlendFunc (GL_ONE,GL_ONE_MINUS_SRC_ALPHA);
//May need to manually set context here
- m_shaderProgram = new QGLShaderProgram();
+ m_shaderProgram = new QOpenGLShaderProgram();
- m_shaderProgram->addShaderFromSourceCode(QGLShader::Vertex, textureVertexProgram);
- m_shaderProgram->addShaderFromSourceCode(QGLShader::Fragment, textureFragmentProgram);
+ m_shaderProgram->addShaderFromSourceCode(QOpenGLShader::Vertex, textureVertexProgram);
+ m_shaderProgram->addShaderFromSourceCode(QOpenGLShader::Fragment, textureFragmentProgram);
m_shaderProgram->link();
m_shaderProgram->bind();
@@ -97,13 +98,13 @@ void SurfaceRenderer::drawTexture(int textureId, const QRectF &geometry, int dep
GLuint SurfaceRenderer::textureFromImage(const QImage &image)
{
//TODO: Replace this line
- QImage convertedImage = QGLWidget::convertToGLFormat(image);
+ //QImage convertedImage = QGLWidget::convertToGLFormat(image);
GLuint textureId;
//Copy QImage data to Texture
glGenTextures(1, &textureId);
glBindTexture(GL_TEXTURE_2D, textureId);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, convertedImage.width(), convertedImage.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, convertedImage.constBits());
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image.width(), image.height(), 0, GL_RGBA, GL_UNSIGNED_BYTE, image.constBits());
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
diff --git a/examples/qwindow-compositor/surfacerenderer.h b/examples/qwindow-compositor/surfacerenderer.h
index d2e03a47a..abfb554b0 100644
--- a/examples/qwindow-compositor/surfacerenderer.h
+++ b/examples/qwindow-compositor/surfacerenderer.h
@@ -2,7 +2,7 @@
#define SURFACERENDERER_H
#include <QOpenGLContext>
-#include <QGLShaderProgram>
+#include <QOpenGLShaderProgram>
#include <QWindow>
class SurfaceRenderer
@@ -18,7 +18,7 @@ private:
QOpenGLContext *m_context;
QWindow *m_surface;
- QGLShaderProgram *m_shaderProgram;
+ QOpenGLShaderProgram *m_shaderProgram;
QMatrix4x4 m_transformMatrix;
int m_matrixLocation;
diff --git a/modules/qt_compositor.pri b/modules/qt_compositor.pri
new file mode 100644
index 000000000..eb6af778d
--- /dev/null
+++ b/modules/qt_compositor.pri
@@ -0,0 +1,19 @@
+QT.compositor.VERSION = 5.0.0
+QT.compositor.MAJOR_VERSION = 5
+QT.compositor.MINOR_VERSION = 0
+QT.compositor.PATCH_VERSION = 0
+
+QT.compositor.name = QtCompositor
+QT.compositor.bins = $$QT_MODULE_BIN_BASE
+QT.compositor.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/QtCompositor
+QT.compositor.private_includes = $$QT_MODULE_INCLUDE_BASE/QtCompositor/$$QT.compositor.VERSION
+QT.compositor.sources = $$QT_MODULE_BASE/src/compositor
+QT.compositor.libs = $$QT_MODULE_LIB_BASE
+QT.compositor.plugins = $$QT_MODULE_PLUGIN_BASE
+QT.compositor.imports = $$QT_MODULE_IMPORT_BASE
+QT.compositor.depends = gui
+contains(QT_CONFIG, opengl) {
+ QT.compositor.DEFINES = QT_COMPOSITOR_WAYLAND_GL
+}
+
+QT_CONFIG += compositor
diff --git a/qtwayland.pro b/qtwayland.pro
index 8feb4aa44..2d56e733a 100644
--- a/qtwayland.pro
+++ b/qtwayland.pro
@@ -1,2 +1,14 @@
TEMPLATE=subdirs
-SUBDIRS=src
+
+module_qtcompositor_src.subdir = src
+module_qtcompositor_src.target = module-module_qtcompositor_src
+
+module_qtcompositor_examples.subdir = examples
+module_qtcompositor_examples.target = module_qtcompositor_examples
+module_qtcompositor_examples.depends = module_qtcompositor_src
+!contains(QT_BUILD_PARTS,examples) {
+ module_qtcompositor_examples.CONFIG = no_default_target no_default_install
+}
+
+SUBDIRS += module_qtcompositor_src \
+ module_qtcompositor_examples \
diff --git a/src/qt-compositor/qt-compositor.pri b/src/compositor/compositor.pri
index 7b421f314..de95dc4ce 100644
--- a/src/qt-compositor/qt-compositor.pri
+++ b/src/compositor/compositor.pri
@@ -1,5 +1,9 @@
+CONFIG += module
+MODULE_PRI += $$PWD/../../modules/qt_compositor.pri
+
INCLUDEPATH += $$PWD
DEFINES += QT_WAYLAND_WINDOWMANAGER_SUPPORT
+DEFINES += QT_BUILD_COMPOSITOR_LIB
!mac:use_pkgconfig {
CONFIG += link_pkgconfig
@@ -19,6 +23,8 @@ DEFINES += QT_WAYLAND_WINDOWMANAGER_SUPPORT
LIBS += -lwayland-server -lffi
}
+HEADERS += qtcompositorversion.h
+
include ($$PWD/util/util.pri)
include ($$PWD/wayland_wrapper/wayland_wrapper.pri)
include ($$PWD/hardware_integration/hardware_integration.pri)
diff --git a/src/compositor/compositor.pro b/src/compositor/compositor.pro
new file mode 100644
index 000000000..850e350dd
--- /dev/null
+++ b/src/compositor/compositor.pro
@@ -0,0 +1,10 @@
+load(qt_module)
+
+TARGET = QtCompositor
+QPRO_PWD = $$PWD
+
+include (compositor.pri)
+load(qt_module_config)
+
+QT += gui-private
+
diff --git a/src/qt-compositor/compositor_api/compositor_api.pri b/src/compositor/compositor_api/compositor_api.pri
index 107266237..374c7747d 100644
--- a/src/qt-compositor/compositor_api/compositor_api.pri
+++ b/src/compositor/compositor_api/compositor_api.pri
@@ -8,14 +8,15 @@ SOURCES += \
$$PWD/waylandcompositor.cpp \
$$PWD/waylandsurface.cpp
-contains(QT, declarative) {
+QT += core-private
+
+contains(QT_CONFIG, quick) {
SOURCES += $$PWD/waylandsurfaceitem.cpp
HEADERS += $$PWD/waylandsurfaceitem.h
- DEFINES += QT_COMPOSITOR_DECLARATIVE
-}
+ DEFINES += QT_COMPOSITOR_QUICK
-!isEmpty(QT.core.MAJOR_VERSION):greaterThan(QT.core.MAJOR_VERSION, 4) {
- QT += core-private
- contains(QT, declarative):QT += declarative-private gui-private
+ QT += quick
+ QT += quick-private gui-private
}
+
diff --git a/src/qt-compositor/compositor_api/waylandcompositor.cpp b/src/compositor/compositor_api/waylandcompositor.cpp
index a21a7eaf2..a21a7eaf2 100644
--- a/src/qt-compositor/compositor_api/waylandcompositor.cpp
+++ b/src/compositor/compositor_api/waylandcompositor.cpp
diff --git a/src/qt-compositor/compositor_api/waylandcompositor.h b/src/compositor/compositor_api/waylandcompositor.h
index 06d8ec703..557aa6ce9 100644
--- a/src/qt-compositor/compositor_api/waylandcompositor.h
+++ b/src/compositor/compositor_api/waylandcompositor.h
@@ -56,7 +56,7 @@ namespace Wayland
class Compositor;
}
-class WaylandCompositor
+class Q_COMPOSITOR_EXPORT WaylandCompositor
{
public:
WaylandCompositor(QWindow *window = 0, const char *socketName = 0);
diff --git a/src/qt-compositor/compositor_api/waylandsurface.cpp b/src/compositor/compositor_api/waylandsurface.cpp
index 8fdc7370c..8fdc7370c 100644
--- a/src/qt-compositor/compositor_api/waylandsurface.cpp
+++ b/src/compositor/compositor_api/waylandsurface.cpp
diff --git a/src/qt-compositor/compositor_api/waylandsurface.h b/src/compositor/compositor_api/waylandsurface.h
index fb2e1721c..d9f68d7c1 100644
--- a/src/qt-compositor/compositor_api/waylandsurface.h
+++ b/src/compositor/compositor_api/waylandsurface.h
@@ -59,7 +59,7 @@ class Surface;
class SurfacePrivate;
}
-class WaylandSurface : public QObject
+class Q_COMPOSITOR_EXPORT WaylandSurface : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(WaylandSurface)
diff --git a/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp b/src/compositor/compositor_api/waylandsurfaceitem.cpp
index bf91499d2..0de4f9884 100644
--- a/src/qt-compositor/compositor_api/waylandsurfaceitem.cpp
+++ b/src/compositor/compositor_api/waylandsurfaceitem.cpp
@@ -41,13 +41,13 @@
#include "waylandsurfaceitem.h"
#include "waylandsurface.h"
-#include <QtDeclarative/QSGEngine>
+#include <QtQuick/QSGEngine>
#include <QtGui/QKeyEvent>
-#include <QtDeclarative/QSGSimpleTextureNode>
-#include <QtDeclarative/QSGSimpleRectNode>
-#include <QtDeclarative/QQuickCanvas>
+#include <QtQuick/QSGSimpleTextureNode>
+#include <QtQuick/QSGSimpleRectNode>
+#include <QtQuick/QQuickCanvas>
class WaylandSurfaceTextureProvider : public QSGTextureProvider
{
diff --git a/src/qt-compositor/compositor_api/waylandsurfaceitem.h b/src/compositor/compositor_api/waylandsurfaceitem.h
index 78fcd0c66..a66a2cead 100644
--- a/src/qt-compositor/compositor_api/waylandsurfaceitem.h
+++ b/src/compositor/compositor_api/waylandsurfaceitem.h
@@ -46,14 +46,14 @@
#include <QtQuick/QQuickItem>
#include <QtQuick/qsgtexture.h>
-#include <private/qsgtextureprovider_p.h>
+#include <QtQuick/private/qsgtextureprovider_p.h>
class WaylandSurface;
class WaylandSurfaceTextureProvider;
Q_DECLARE_METATYPE(WaylandSurface*)
-class WaylandSurfaceItem : public QQuickItem
+class Q_COMPOSITOR_EXPORT WaylandSurfaceItem : public QQuickItem
{
Q_OBJECT
Q_PROPERTY(WaylandSurface* surface READ surface WRITE setSurface)
diff --git a/src/qt-compositor/hardware_integration/dri2_xcb/README b/src/compositor/hardware_integration/dri2_xcb/README
index e99500df7..e99500df7 100644
--- a/src/qt-compositor/hardware_integration/dri2_xcb/README
+++ b/src/compositor/hardware_integration/dri2_xcb/README
diff --git a/src/qt-compositor/hardware_integration/dri2_xcb/dri2_xcb.pri b/src/compositor/hardware_integration/dri2_xcb/dri2_xcb.pri
index 641c7a91a..641c7a91a 100644
--- a/src/qt-compositor/hardware_integration/dri2_xcb/dri2_xcb.pri
+++ b/src/compositor/hardware_integration/dri2_xcb/dri2_xcb.pri
diff --git a/src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.cpp b/src/compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.cpp
index eb516d1d2..eb516d1d2 100644
--- a/src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.cpp
+++ b/src/compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.cpp
diff --git a/src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.h b/src/compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.h
index 61d431ded..61d431ded 100644
--- a/src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.h
+++ b/src/compositor/hardware_integration/dri2_xcb/dri2xcbbuffer.h
diff --git a/src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.cpp b/src/compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.cpp
index 0d16f78c6..0d16f78c6 100644
--- a/src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.cpp
+++ b/src/compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.cpp
diff --git a/src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.h b/src/compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.h
index 9ed355815..9ed355815 100644
--- a/src/qt-compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.h
+++ b/src/compositor/hardware_integration/dri2_xcb/dri2xcbhwintegration.h
diff --git a/src/qt-compositor/hardware_integration/graphicshardwareintegration.cpp b/src/compositor/hardware_integration/graphicshardwareintegration.cpp
index c37598374..c37598374 100644
--- a/src/qt-compositor/hardware_integration/graphicshardwareintegration.cpp
+++ b/src/compositor/hardware_integration/graphicshardwareintegration.cpp
diff --git a/src/qt-compositor/hardware_integration/graphicshardwareintegration.h b/src/compositor/hardware_integration/graphicshardwareintegration.h
index 9f1f409d0..9f1f409d0 100644
--- a/src/qt-compositor/hardware_integration/graphicshardwareintegration.h
+++ b/src/compositor/hardware_integration/graphicshardwareintegration.h
diff --git a/src/qt-compositor/hardware_integration/hardware_integration.pri b/src/compositor/hardware_integration/hardware_integration.pri
index 02a834bbc..6e65ea9a3 100644
--- a/src/qt-compositor/hardware_integration/hardware_integration.pri
+++ b/src/compositor/hardware_integration/hardware_integration.pri
@@ -13,16 +13,16 @@ isEmpty(QT_WAYLAND_GL_CONFIG):QT_WAYLAND_GL_CONFIG = $$(QT_WAYLAND_GL_CONFIG)
QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
} else {
contains(QT_CONFIG, opengles2) {
- isEqual(QT_WAYLAND_GL_CONFIG, wayland_egl) {
- QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
- CONFIG += mesa_egl
- DEFINES += MESA_EGL_NO_X11_HEADERS
+ isEqual(QT_WAYLAND_GL_CONFIG, xcomposite_egl) {
+ QT_WAYLAND_GL_INTEGRATION = xcomposite_egl
+ CONFIG += xcomposite_egl
} else:isEqual(QT_WAYLAND_GL_CONFIG,dri2_xcb) {
QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
CONFIG += dri2_xcb
} else {
- QT_WAYLAND_GL_INTEGRATION = xcomposite_egl
- CONFIG += xcomposite_egl
+ QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
+ CONFIG += wayland_egl
+ DEFINES += MESA_EGL_NO_X11_HEADERS
}
} else {
QT_WAYLAND_GL_INTEGRATION = xcomposite_glx
@@ -34,7 +34,7 @@ isEmpty(QT_WAYLAND_GL_CONFIG):QT_WAYLAND_GL_CONFIG = $$(QT_WAYLAND_GL_CONFIG)
system(echo "Qt-Compositor configured as raster only compositor")
}
-mesa_egl {
+wayland_egl {
include (wayland_egl/wayland_egl.pri)
}
dri2_xcb {
diff --git a/src/qt-compositor/hardware_integration/wayland_egl/wayland_egl.pri b/src/compositor/hardware_integration/wayland_egl/wayland_egl.pri
index 258923904..258923904 100644
--- a/src/qt-compositor/hardware_integration/wayland_egl/wayland_egl.pri
+++ b/src/compositor/hardware_integration/wayland_egl/wayland_egl.pri
diff --git a/src/qt-compositor/hardware_integration/wayland_egl/waylandeglintegration.cpp b/src/compositor/hardware_integration/wayland_egl/waylandeglintegration.cpp
index a232c4876..a232c4876 100644
--- a/src/qt-compositor/hardware_integration/wayland_egl/waylandeglintegration.cpp
+++ b/src/compositor/hardware_integration/wayland_egl/waylandeglintegration.cpp
diff --git a/src/qt-compositor/hardware_integration/wayland_egl/waylandeglintegration.h b/src/compositor/hardware_integration/wayland_egl/waylandeglintegration.h
index 7add3df7d..7add3df7d 100644
--- a/src/qt-compositor/hardware_integration/wayland_egl/waylandeglintegration.h
+++ b/src/compositor/hardware_integration/wayland_egl/waylandeglintegration.h
diff --git a/src/qt-compositor/hardware_integration/xcomposite_egl/xcomposite_egl.pri b/src/compositor/hardware_integration/xcomposite_egl/xcomposite_egl.pri
index f4be9a259..f4be9a259 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_egl/xcomposite_egl.pri
+++ b/src/compositor/hardware_integration/xcomposite_egl/xcomposite_egl.pri
diff --git a/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp b/src/compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp
index dad0c0298..dad0c0298 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp
+++ b/src/compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.cpp
diff --git a/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.h b/src/compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.h
index 9e3b16f33..9e3b16f33 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.h
+++ b/src/compositor/hardware_integration/xcomposite_egl/xcompositeeglintegration.h
diff --git a/src/qt-compositor/hardware_integration/xcomposite_glx/xcomposite_glx.pri b/src/compositor/hardware_integration/xcomposite_glx/xcomposite_glx.pri
index e8d4d0134..e8d4d0134 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_glx/xcomposite_glx.pri
+++ b/src/compositor/hardware_integration/xcomposite_glx/xcomposite_glx.pri
diff --git a/src/qt-compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp b/src/compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp
index 9d7043952..9d7043952 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp
+++ b/src/compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.cpp
diff --git a/src/qt-compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.h b/src/compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.h
index 43f062fdf..43f062fdf 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.h
+++ b/src/compositor/hardware_integration/xcomposite_glx/xcompositeglxintegration.h
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/protocol/wayland-xcomposite.xml b/src/compositor/hardware_integration/xcomposite_share/protocol/wayland-xcomposite.xml
index 7d68d64a0..7d68d64a0 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/protocol/wayland-xcomposite.xml
+++ b/src/compositor/hardware_integration/xcomposite_share/protocol/wayland-xcomposite.xml
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-client-protocol.h b/src/compositor/hardware_integration/xcomposite_share/wayland-xcomposite-client-protocol.h
index f502bbaf3..f502bbaf3 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-client-protocol.h
+++ b/src/compositor/hardware_integration/xcomposite_share/wayland-xcomposite-client-protocol.h
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-protocol.c b/src/compositor/hardware_integration/xcomposite_share/wayland-xcomposite-protocol.c
index 1662ec823..1662ec823 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-protocol.c
+++ b/src/compositor/hardware_integration/xcomposite_share/wayland-xcomposite-protocol.c
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-server-protocol.h b/src/compositor/hardware_integration/xcomposite_share/wayland-xcomposite-server-protocol.h
index dfbb24dde..dfbb24dde 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/wayland-xcomposite-server-protocol.h
+++ b/src/compositor/hardware_integration/xcomposite_share/wayland-xcomposite-server-protocol.h
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/xcomposite_share.pri b/src/compositor/hardware_integration/xcomposite_share/xcomposite_share.pri
index e4001a5bb..e4001a5bb 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/xcomposite_share.pri
+++ b/src/compositor/hardware_integration/xcomposite_share/xcomposite_share.pri
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/xcompositebuffer.cpp b/src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.cpp
index b5b2d03d6..b5b2d03d6 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/xcompositebuffer.cpp
+++ b/src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.cpp
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/xcompositebuffer.h b/src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.h
index 52154d406..52154d406 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/xcompositebuffer.h
+++ b/src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.h
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp b/src/compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp
index a434c9aa4..a434c9aa4 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp
+++ b/src/compositor/hardware_integration/xcomposite_share/xcompositehandler.cpp
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/xcompositehandler.h b/src/compositor/hardware_integration/xcomposite_share/xcompositehandler.h
index 28f5cd3db..28f5cd3db 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/xcompositehandler.h
+++ b/src/compositor/hardware_integration/xcomposite_share/xcompositehandler.h
diff --git a/src/qt-compositor/hardware_integration/xcomposite_share/xlibinclude.h b/src/compositor/hardware_integration/xcomposite_share/xlibinclude.h
index dfb0c2965..dfb0c2965 100644
--- a/src/qt-compositor/hardware_integration/xcomposite_share/xlibinclude.h
+++ b/src/compositor/hardware_integration/xcomposite_share/xlibinclude.h
diff --git a/src/qt-compositor/util/util.pri b/src/compositor/util/util.pri
index fe5e9e606..fe5e9e606 100644
--- a/src/qt-compositor/util/util.pri
+++ b/src/compositor/util/util.pri
diff --git a/src/qt-compositor/util/waylandobject.h b/src/compositor/util/waylandobject.h
index a64cfd0c7..a64cfd0c7 100644
--- a/src/qt-compositor/util/waylandobject.h
+++ b/src/compositor/util/waylandobject.h
diff --git a/src/qt-compositor/wayland_wrapper/wayland_wrapper.pri b/src/compositor/wayland_wrapper/wayland_wrapper.pri
index 478b39982..478b39982 100644
--- a/src/qt-compositor/wayland_wrapper/wayland_wrapper.pri
+++ b/src/compositor/wayland_wrapper/wayland_wrapper.pri
diff --git a/src/qt-compositor/wayland_wrapper/wlcompositor.cpp b/src/compositor/wayland_wrapper/wlcompositor.cpp
index 168094734..168094734 100644
--- a/src/qt-compositor/wayland_wrapper/wlcompositor.cpp
+++ b/src/compositor/wayland_wrapper/wlcompositor.cpp
diff --git a/src/qt-compositor/wayland_wrapper/wlcompositor.h b/src/compositor/wayland_wrapper/wlcompositor.h
index 9aaba776d..9aaba776d 100644
--- a/src/qt-compositor/wayland_wrapper/wlcompositor.h
+++ b/src/compositor/wayland_wrapper/wlcompositor.h
diff --git a/src/qt-compositor/wayland_wrapper/wldatadevice.cpp b/src/compositor/wayland_wrapper/wldatadevice.cpp
index e7bdfb434..e7bdfb434 100644
--- a/src/qt-compositor/wayland_wrapper/wldatadevice.cpp
+++ b/src/compositor/wayland_wrapper/wldatadevice.cpp
diff --git a/src/qt-compositor/wayland_wrapper/wldatadevice.h b/src/compositor/wayland_wrapper/wldatadevice.h
index 4be777dbf..4be777dbf 100644
--- a/src/qt-compositor/wayland_wrapper/wldatadevice.h
+++ b/src/compositor/wayland_wrapper/wldatadevice.h
diff --git a/src/qt-compositor/wayland_wrapper/wldatadevicemanager.cpp b/src/compositor/wayland_wrapper/wldatadevicemanager.cpp
index 834ef9545..834ef9545 100644
--- a/src/qt-compositor/wayland_wrapper/wldatadevicemanager.cpp
+++ b/src/compositor/wayland_wrapper/wldatadevicemanager.cpp
diff --git a/src/qt-compositor/wayland_wrapper/wldatadevicemanager.h b/src/compositor/wayland_wrapper/wldatadevicemanager.h
index 87398c4cf..87398c4cf 100644
--- a/src/qt-compositor/wayland_wrapper/wldatadevicemanager.h
+++ b/src/compositor/wayland_wrapper/wldatadevicemanager.h
diff --git a/src/qt-compositor/wayland_wrapper/wldataoffer.cpp b/src/compositor/wayland_wrapper/wldataoffer.cpp
index 882337352..882337352 100644
--- a/src/qt-compositor/wayland_wrapper/wldataoffer.cpp
+++ b/src/compositor/wayland_wrapper/wldataoffer.cpp
diff --git a/src/qt-compositor/wayland_wrapper/wldataoffer.h b/src/compositor/wayland_wrapper/wldataoffer.h
index 5db80f62b..5db80f62b 100644
--- a/src/qt-compositor/wayland_wrapper/wldataoffer.h
+++ b/src/compositor/wayland_wrapper/wldataoffer.h
diff --git a/src/qt-compositor/wayland_wrapper/wldatasource.cpp b/src/compositor/wayland_wrapper/wldatasource.cpp
index a3c75ec73..a3c75ec73 100644
--- a/src/qt-compositor/wayland_wrapper/wldatasource.cpp
+++ b/src/compositor/wayland_wrapper/wldatasource.cpp
diff --git a/src/qt-compositor/wayland_wrapper/wldatasource.h b/src/compositor/wayland_wrapper/wldatasource.h
index 59385ecc3..59385ecc3 100644
--- a/src/qt-compositor/wayland_wrapper/wldatasource.h
+++ b/src/compositor/wayland_wrapper/wldatasource.h
diff --git a/src/qt-compositor/wayland_wrapper/wldisplay.cpp b/src/compositor/wayland_wrapper/wldisplay.cpp
index 4277de166..4277de166 100644
--- a/src/qt-compositor/wayland_wrapper/wldisplay.cpp
+++ b/src/compositor/wayland_wrapper/wldisplay.cpp
diff --git a/src/qt-compositor/wayland_wrapper/wldisplay.h b/src/compositor/wayland_wrapper/wldisplay.h
index 5b2e5023d..5b2e5023d 100644
--- a/src/qt-compositor/wayland_wrapper/wldisplay.h
+++ b/src/compositor/wayland_wrapper/wldisplay.h
diff --git a/src/qt-compositor/wayland_wrapper/wlinputdevice.cpp b/src/compositor/wayland_wrapper/wlinputdevice.cpp
index a7ce0d43a..a7ce0d43a 100644
--- a/src/qt-compositor/wayland_wrapper/wlinputdevice.cpp
+++ b/src/compositor/wayland_wrapper/wlinputdevice.cpp
diff --git a/src/qt-compositor/wayland_wrapper/wlinputdevice.h b/src/compositor/wayland_wrapper/wlinputdevice.h
index 7ea56a918..7ea56a918 100644
--- a/src/qt-compositor/wayland_wrapper/wlinputdevice.h
+++ b/src/compositor/wayland_wrapper/wlinputdevice.h
diff --git a/src/qt-compositor/wayland_wrapper/wloutput.cpp b/src/compositor/wayland_wrapper/wloutput.cpp
index 0f61bc051..0f61bc051 100644
--- a/src/qt-compositor/wayland_wrapper/wloutput.cpp
+++ b/src/compositor/wayland_wrapper/wloutput.cpp
diff --git a/src/qt-compositor/wayland_wrapper/wloutput.h b/src/compositor/wayland_wrapper/wloutput.h
index 84c91a2f5..84c91a2f5 100644
--- a/src/qt-compositor/wayland_wrapper/wloutput.h
+++ b/src/compositor/wayland_wrapper/wloutput.h
diff --git a/src/qt-compositor/wayland_wrapper/wlshell.cpp b/src/compositor/wayland_wrapper/wlshell.cpp
index e6ab73762..e6ab73762 100644
--- a/src/qt-compositor/wayland_wrapper/wlshell.cpp
+++ b/src/compositor/wayland_wrapper/wlshell.cpp
diff --git a/src/qt-compositor/wayland_wrapper/wlshell.h b/src/compositor/wayland_wrapper/wlshell.h
index a748186e8..a748186e8 100644
--- a/src/qt-compositor/wayland_wrapper/wlshell.h
+++ b/src/compositor/wayland_wrapper/wlshell.h
diff --git a/src/qt-compositor/wayland_wrapper/wlshmbuffer.cpp b/src/compositor/wayland_wrapper/wlshmbuffer.cpp
index c5126aeaa..c5126aeaa 100644
--- a/src/qt-compositor/wayland_wrapper/wlshmbuffer.cpp
+++ b/src/compositor/wayland_wrapper/wlshmbuffer.cpp
diff --git a/src/qt-compositor/wayland_wrapper/wlshmbuffer.h b/src/compositor/wayland_wrapper/wlshmbuffer.h
index e8092ce2a..e8092ce2a 100644
--- a/src/qt-compositor/wayland_wrapper/wlshmbuffer.h
+++ b/src/compositor/wayland_wrapper/wlshmbuffer.h
diff --git a/src/qt-compositor/wayland_wrapper/wlsurface.cpp b/src/compositor/wayland_wrapper/wlsurface.cpp
index 1edbeb7ea..1edbeb7ea 100644
--- a/src/qt-compositor/wayland_wrapper/wlsurface.cpp
+++ b/src/compositor/wayland_wrapper/wlsurface.cpp
diff --git a/src/qt-compositor/wayland_wrapper/wlsurface.h b/src/compositor/wayland_wrapper/wlsurface.h
index 4d037a26e..4d037a26e 100644
--- a/src/qt-compositor/wayland_wrapper/wlsurface.h
+++ b/src/compositor/wayland_wrapper/wlsurface.h
diff --git a/src/qt-compositor/windowmanagerprotocol/wayland-windowmanager-protocol.c b/src/compositor/windowmanagerprotocol/wayland-windowmanager-protocol.c
index 7e8861b67..7e8861b67 100644
--- a/src/qt-compositor/windowmanagerprotocol/wayland-windowmanager-protocol.c
+++ b/src/compositor/windowmanagerprotocol/wayland-windowmanager-protocol.c
diff --git a/src/qt-compositor/windowmanagerprotocol/wayland-windowmanager-server-protocol.h b/src/compositor/windowmanagerprotocol/wayland-windowmanager-server-protocol.h
index 5b7dda247..5b7dda247 100644
--- a/src/qt-compositor/windowmanagerprotocol/wayland-windowmanager-server-protocol.h
+++ b/src/compositor/windowmanagerprotocol/wayland-windowmanager-server-protocol.h
diff --git a/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp b/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp
index 815032fbc..815032fbc 100644
--- a/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp
+++ b/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration.cpp
diff --git a/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.h b/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration.h
index 950fed1dd..950fed1dd 100644
--- a/src/qt-compositor/windowmanagerprotocol/waylandwindowmanagerintegration.h
+++ b/src/compositor/windowmanagerprotocol/waylandwindowmanagerintegration.h
diff --git a/src/qt-compositor/windowmanagerprotocol/windowmanager.xml b/src/compositor/windowmanagerprotocol/windowmanager.xml
index 6f0db5b6f..6f0db5b6f 100644
--- a/src/qt-compositor/windowmanagerprotocol/windowmanager.xml
+++ b/src/compositor/windowmanagerprotocol/windowmanager.xml
diff --git a/src/qt-compositor/windowmanagerprotocol/windowmanagerprotocol.pri b/src/compositor/windowmanagerprotocol/windowmanagerprotocol.pri
index b03b08778..b03b08778 100644
--- a/src/qt-compositor/windowmanagerprotocol/windowmanagerprotocol.pri
+++ b/src/compositor/windowmanagerprotocol/windowmanagerprotocol.pri
diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro
new file mode 100644
index 000000000..b912e2554
--- /dev/null
+++ b/src/plugins/platforms/platforms.pro
@@ -0,0 +1,2 @@
+TEMPLATE=subdirs
+SUBDIRS += wayland
diff --git a/src/plugins/platforms/wayland/gl_integration/gl_integration.pri b/src/plugins/platforms/wayland/gl_integration/gl_integration.pri
index 20c3aa0bd..8b41f2121 100644
--- a/src/plugins/platforms/wayland/gl_integration/gl_integration.pri
+++ b/src/plugins/platforms/wayland/gl_integration/gl_integration.pri
@@ -10,15 +10,15 @@ SOURCES += \
QT_WAYLAND_GL_CONFIG = $$(QT_WAYLAND_GL_CONFIG)
contains(QT_CONFIG, opengles2) {
- isEqual(QT_WAYLAND_GL_CONFIG, wayland_egl) {
- QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
- CONFIG += wayland_egl
+ isEqual(QT_WAYLAND_GL_CONFIG, xcomposite_egl) {
+ QT_WAYLAND_GL_INTEGRATION = xcomposite_egl
+ CONFIG += xcomposite_egl
} else:isEqual(QT_WAYLAND_GL_CONFIG,readback) {
QT_WAYLAND_GL_INTEGRATION = readback_egl
CONFIG += readback_egl
} else {
- QT_WAYLAND_GL_INTEGRATION = xcomposite_egl
- CONFIG += xcomposite_egl
+ QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
+ CONFIG += wayland_egl
}
} else:mac {
QT_WAYLAND_GL_INTEGRATION = readback_cgl
diff --git a/src/plugins/platforms/wayland/wayland.pro b/src/plugins/platforms/wayland/wayland.pro
index 3df4cb737..6493ec01b 100644
--- a/src/plugins/platforms/wayland/wayland.pro
+++ b/src/plugins/platforms/wayland/wayland.pro
@@ -1,9 +1,10 @@
TARGET = qwayland
load(qt_plugin)
+load(qt_module)
CONFIG += qpa/genericunixfontdatabase
-#DESTDIR = $$QT.gui.plugins/platforms
+DESTDIR = $$QT.gui.plugins/platforms
DEFINES += Q_PLATFORM_WAYLAND
DEFINES += $$QMAKE_DEFINES_WAYLAND
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
new file mode 100644
index 000000000..3dd6c024b
--- /dev/null
+++ b/src/plugins/plugins.pro
@@ -0,0 +1,2 @@
+TEMPLATE=subdirs
+SUBDIRS += platforms
diff --git a/src/qt-compositor/qt-compositor.pro b/src/qt-compositor/qt-compositor.pro
deleted file mode 100644
index 0d122770e..000000000
--- a/src/qt-compositor/qt-compositor.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-TEMPLATE = lib
-
-include (qt-compositor.pri)
-
-installPath = $$INSTALLBASE
-
-target.path = $$installPath/lib
-headers_path = $$installPath/include
-
-headers.path = $$headers_path/qt-compositor
-headers.files = $$HEADERS
-
-INSTALLS = target headers
-
-QT += gui-private
diff --git a/src/src.pro b/src/src.pro
index d2dd7c8f2..81bc9ac93 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -1,2 +1,2 @@
TEMPLATE=subdirs
-SUBDIRS=qt-compositor
+SUBDIRS += plugins compositor
diff --git a/sync.profile b/sync.profile
new file mode 100644
index 000000000..27887ee82
--- /dev/null
+++ b/sync.profile
@@ -0,0 +1,24 @@
+%modules = ( # path to module name map
+ "QtCompositor" => "$basedir/src/compositor",
+);
+%moduleheaders = ( # restrict the module headers to those found in relative path
+);
+%classnames = (
+);
+%mastercontent = (
+ "gui" => "#include <QtGui/QtGui>\n",
+);
+%modulepris = (
+ "QtCompositor" => "$basedir/modules/qt_compositor.pri",
+);
+%deprecatedheaders = (
+);
+# Module dependencies.
+# Every module that is required to build this module should have one entry.
+# Each of the module version specifiers can take one of the following values:
+# - A specific Git revision.
+# - any git symbolic ref resolvable from the module's repository (e.g. "refs/heads/master" to track master branch)
+#
+%dependencies = (
+ "qtbase" => "refs/heads/master",
+);