diff options
Diffstat (limited to 'examples/wayland')
18 files changed, 117 insertions, 118 deletions
diff --git a/examples/wayland/custom-extension/compositor/qml/Screen.qml b/examples/wayland/custom-extension/compositor/qml/Screen.qml index 3173c7a08..b6e4e12d0 100644 --- a/examples/wayland/custom-extension/compositor/qml/Screen.qml +++ b/examples/wayland/custom-extension/compositor/qml/Screen.qml @@ -58,7 +58,7 @@ WaylandOutput { id: mouseTracker anchors.fill: parent - enableWSCursor: true + windowSystemCursorEnabled: true Image { id: background anchors.fill: parent @@ -69,10 +69,10 @@ WaylandOutput { WaylandCursorItem { id: cursor inputEventsEnabled: false - x: mouseTracker.mouseX - hotspotX - y: mouseTracker.mouseY - hotspotY + x: mouseTracker.mouseX + y: mouseTracker.mouseY - inputDevice: output.compositor.defaultInputDevice + seat: output.compositor.defaultSeat } Rectangle { anchors.bottom: parent.bottom diff --git a/examples/wayland/custom-extension/compositor/qml/main.qml b/examples/wayland/custom-extension/compositor/qml/main.qml index 097bfe30b..a7ca56e03 100644 --- a/examples/wayland/custom-extension/compositor/qml/main.qml +++ b/examples/wayland/custom-extension/compositor/qml/main.qml @@ -74,22 +74,18 @@ WaylandCompositor { } } - extensions: [ - WlShell { - id: defaultShell - - onShellSurfaceCreated: { - var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); - lastItem = item; - } - }, - CustomExtension { - id: custom - onRequestReceived: { - console.log("Compositor received a request: \"" + text + "\", " + value) - } + WlShell { + id: defaultShell + onWlShellSurfaceCreated: { + var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); + lastItem = item; } + } - ] - + CustomExtension { + id: custom + onRequestReceived: { + console.log("Compositor received a request: \"" + text + "\", " + value) + } + } } diff --git a/examples/wayland/minimal-cpp/window.cpp b/examples/wayland/minimal-cpp/window.cpp index 25ea6b64f..2d529cce5 100644 --- a/examples/wayland/minimal-cpp/window.cpp +++ b/examples/wayland/minimal-cpp/window.cpp @@ -85,7 +85,7 @@ void Window::paintGL() continue; GLuint textureId = view->getTexture(); QWaylandSurface *surface = view->surface(); - if (surface && surface->isMapped()) { + if (surface && surface->hasContent()) { QSize s = surface->size(); QPointF pos(sillyrandom(width() - s.width()), sillyrandom(height() - s.height())); QRectF surfaceGeometry(pos, s); diff --git a/examples/wayland/minimal-cpp/window.h b/examples/wayland/minimal-cpp/window.h index c468abbbe..4df1bc833 100644 --- a/examples/wayland/minimal-cpp/window.h +++ b/examples/wayland/minimal-cpp/window.h @@ -42,7 +42,7 @@ #define WINDOW_H #include <QOpenGLWindow> -#include <QtGui/private/qopengltextureblitter_p.h> +#include <QOpenGLTextureBlitter> QT_BEGIN_NAMESPACE diff --git a/examples/wayland/minimal-qml/main.qml b/examples/wayland/minimal-qml/main.qml index dde223859..ce64084ce 100644 --- a/examples/wayland/minimal-qml/main.qml +++ b/examples/wayland/minimal-qml/main.qml @@ -71,14 +71,12 @@ WaylandCompositor { // shells (window management protocols). When the // client creates a new window, we instantiate a // chromeComponent on the output. - extensions: [ - WlShell { - onShellSurfaceCreated: - chromeComponent.createObject(surfaceArea, { "shellSurface": shellSurface } ); - }, - XdgShell { - onXdgSurfaceCreated: - chromeComponent.createObject(surfaceArea, { "shellSurface": xdgSurface } ); - } - ] + WlShell { + onWlShellSurfaceCreated: + chromeComponent.createObject(surfaceArea, { "shellSurface": shellSurface } ); + } + XdgShell { + onXdgSurfaceCreated: + chromeComponent.createObject(surfaceArea, { "shellSurface": xdgSurface } ); + } } diff --git a/examples/wayland/multi-output/qml/GridScreen.qml b/examples/wayland/multi-output/qml/GridScreen.qml index 6b1d574cd..3dab99d0a 100644 --- a/examples/wayland/multi-output/qml/GridScreen.qml +++ b/examples/wayland/multi-output/qml/GridScreen.qml @@ -73,7 +73,7 @@ WaylandOutput { height: gridView.cellHeight sizeFollowsSurface: false inputEventsEnabled: false - view.discardFrontBuffers: true + allowDiscardFrontBuffer: true MouseArea { anchors.fill: parent onClicked: item.surface.activated() diff --git a/examples/wayland/multi-output/qml/ShellChrome.qml b/examples/wayland/multi-output/qml/ShellChrome.qml index dac3eb096..709e83679 100644 --- a/examples/wayland/multi-output/qml/ShellChrome.qml +++ b/examples/wayland/multi-output/qml/ShellChrome.qml @@ -45,7 +45,7 @@ ShellSurfaceItem { id: rootChrome onSurfaceDestroyed: { - view.bufferLock = true; + bufferLocked = true; destroyAnimation.start(); } diff --git a/examples/wayland/multi-output/qml/ShellScreen.qml b/examples/wayland/multi-output/qml/ShellScreen.qml index 77fbeb828..9a6122118 100644 --- a/examples/wayland/multi-output/qml/ShellScreen.qml +++ b/examples/wayland/multi-output/qml/ShellScreen.qml @@ -55,7 +55,7 @@ WaylandOutput { id: mouseTracker anchors.fill: parent - enableWSCursor: true + windowSystemCursorEnabled: true Image { id: background anchors.fill: parent @@ -66,10 +66,10 @@ WaylandOutput { WaylandCursorItem { id: cursor inputEventsEnabled: false - x: mouseTracker.mouseX - hotspotX - y: mouseTracker.mouseY - hotspotY + x: mouseTracker.mouseX + y: mouseTracker.mouseY - inputDevice : output.compositor.defaultInputDevice + seat : output.compositor.defaultSeat } } } diff --git a/examples/wayland/multi-output/qml/main.qml b/examples/wayland/multi-output/qml/main.qml index 6a1483bca..e8a30100d 100644 --- a/examples/wayland/multi-output/qml/main.qml +++ b/examples/wayland/multi-output/qml/main.qml @@ -81,18 +81,16 @@ WaylandCompositor { } } - extensions: [ - WlShell { - id: defaultShell + WlShell { + id: defaultShell - onShellSurfaceCreated: { - var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); - item.surface.activated.connect(item.raise); - } + onWlShellSurfaceCreated: { + var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); + item.surface.activated.connect(item.raise); } - ] + } - onCreateSurface: { + onSurfaceRequested: { var surface = surfaceComponent.createObject(comp, { } ); surface.initialize(comp, client, id, version); } diff --git a/examples/wayland/pure-qml/qml/Chrome.qml b/examples/wayland/pure-qml/qml/Chrome.qml index 1c9066ef1..d2ff5cc2a 100644 --- a/examples/wayland/pure-qml/qml/Chrome.qml +++ b/examples/wayland/pure-qml/qml/Chrome.qml @@ -45,7 +45,7 @@ ShellSurfaceItem { id: rootChrome onSurfaceDestroyed: { - view.bufferLock = true; + bufferLocked = true; destroyAnimation.start(); } diff --git a/examples/wayland/pure-qml/qml/Screen.qml b/examples/wayland/pure-qml/qml/Screen.qml index 2043fa8b4..0920a8b95 100644 --- a/examples/wayland/pure-qml/qml/Screen.qml +++ b/examples/wayland/pure-qml/qml/Screen.qml @@ -58,7 +58,7 @@ WaylandOutput { id: mouseTracker anchors.fill: parent - enableWSCursor: true + windowSystemCursorEnabled: true Image { id: background anchors.fill: parent @@ -73,10 +73,10 @@ WaylandOutput { WaylandCursorItem { id: cursor inputEventsEnabled: false - x: mouseTracker.mouseX - hotspotX - y: mouseTracker.mouseY - hotspotY + x: mouseTracker.mouseX + y: mouseTracker.mouseY - inputDevice: output.compositor.defaultInputDevice + seat: output.compositor.defaultSeat } } diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml index 6ee09f802..69e8d2c84 100644 --- a/examples/wayland/pure-qml/qml/main.qml +++ b/examples/wayland/pure-qml/qml/main.qml @@ -62,28 +62,34 @@ WaylandCompositor { } } - extensions: [ - WindowManager { - id: qtWindowManager - onShowIsFullScreenChanged: console.debug("Show is fullscreen hint for Qt applications:", showIsFullScreen) - }, - WlShell { - onShellSurfaceCreated: { - chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); - } - }, - XdgShell { - onXdgSurfaceCreated: { - chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } ); - } - }, - TextInputManager { + QtWindowManager { + id: qtWindowManager + onShowIsFullScreenChanged: console.debug("Show is fullscreen hint for Qt applications:", showIsFullScreen) + } + + WlShell { + onWlShellSurfaceCreated: { + chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": shellSurface } ); + } + } + + XdgShell { + property variant viewsBySurface: ({}) + onXdgSurfaceCreated: { + var item = chromeComponent.createObject(defaultOutput.surfaceArea, { "shellSurface": xdgSurface } ); + viewsBySurface[xdgSurface.surface] = item; } - ] + onXdgPopupCreated: { + var parentView = viewsBySurface[xdgPopup.parentSurface]; + chromeComponent.createObject(parentView, { "shellSurface": xdgPopup } ); + } + } - onCreateSurface: { + TextInputManager { + } + + onSurfaceRequested: { var surface = surfaceComponent.createObject(comp, { } ); surface.initialize(comp, client, id, version); - } } diff --git a/examples/wayland/qwindow-compositor/compositor.cpp b/examples/wayland/qwindow-compositor/compositor.cpp index c60ecc6b5..d9f850424 100644 --- a/examples/wayland/qwindow-compositor/compositor.cpp +++ b/examples/wayland/qwindow-compositor/compositor.cpp @@ -46,7 +46,7 @@ #include <QtWaylandCompositor/QWaylandXdgShell> #include <QtWaylandCompositor/QWaylandWlShellSurface> -#include <QtWaylandCompositor/qwaylandinput.h> +#include <QtWaylandCompositor/qwaylandseat.h> #include <QtWaylandCompositor/qwaylanddrag.h> #include <QDebug> @@ -72,7 +72,7 @@ GLuint View::getTexture(GLenum *target) if (streamingTexture) m_texture = streamingTexture; - if (!buf.isShm() && buf.bufferFormatEgl() == QWaylandBufferRef::BufferFormatEgl_EXTERNAL_OES) + if (!buf.isSharedMemory() && buf.bufferFormatEgl() == QWaylandBufferRef::BufferFormatEgl_EXTERNAL_OES) m_textureTarget = GL_TEXTURE_EXTERNAL_OES; if (advance()) { @@ -81,7 +81,7 @@ GLuint View::getTexture(GLenum *target) glGenTextures(1, &m_texture); glBindTexture(m_textureTarget, m_texture); - if (buf.isShm()) + if (buf.isSharedMemory()) glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); buf.bindToTexture(); } @@ -101,7 +101,7 @@ bool View::isCursor() const void View::onXdgSetMaximized() { - m_xdgSurface->requestMaximized(output()->geometry().size()); + m_xdgSurface->sendMaximized(output()->geometry().size()); // An improvement here, would have been to wait for the commit after the ack_configure for the // request above before moving the window. This would have prevented the window from being @@ -112,7 +112,7 @@ void View::onXdgSetMaximized() void View::onXdgUnsetMaximized() { - m_xdgSurface->requestUnMaximized(); + m_xdgSurface->sendUnmaximized(); } void View::onXdgSetFullscreen(QWaylandOutput* clientPreferredOutput) @@ -121,7 +121,7 @@ void View::onXdgSetFullscreen(QWaylandOutput* clientPreferredOutput) ? clientPreferredOutput : output(); - m_xdgSurface->requestFullscreen(outputToFullscreen->geometry().size()); + m_xdgSurface->sendFullscreen(outputToFullscreen->geometry().size()); // An improvement here, would have been to wait for the commit after the ack_configure for the // request above before moving the window. This would have prevented the window from being @@ -147,9 +147,9 @@ Compositor::Compositor(QWindow *window) , m_wlShell(new QWaylandWlShell(this)) , m_xdgShell(new QWaylandXdgShell(this)) { - connect(m_wlShell, &QWaylandWlShell::shellSurfaceCreated, this, &Compositor::onWlShellSurfaceCreated); + connect(m_wlShell, &QWaylandWlShell::wlShellSurfaceCreated, this, &Compositor::onWlShellSurfaceCreated); connect(m_xdgShell, &QWaylandXdgShell::xdgSurfaceCreated, this, &Compositor::onXdgSurfaceCreated); - connect(m_xdgShell, &QWaylandXdgShell::createXdgPopup, this, &Compositor::onCreateXdgPopup); + connect(m_xdgShell, &QWaylandXdgShell::xdgPopupRequested, this, &Compositor::onXdgPopupRequested); } Compositor::~Compositor() @@ -162,8 +162,8 @@ void Compositor::create() QWaylandCompositor::create(); connect(this, &QWaylandCompositor::surfaceCreated, this, &Compositor::onSurfaceCreated); - connect(defaultInputDevice(), &QWaylandInputDevice::cursorSurfaceRequest, this, &Compositor::adjustCursorSurface); - connect(defaultInputDevice()->drag(), &QWaylandDrag::dragStarted, this, &Compositor::startDrag); + connect(defaultSeat(), &QWaylandSeat::cursorSurfaceRequest, this, &Compositor::adjustCursorSurface); + connect(defaultSeat()->drag(), &QWaylandDrag::dragStarted, this, &Compositor::startDrag); connect(this, &QWaylandCompositor::subsurfaceChanged, this, &Compositor::onSubsurfaceChanged); } @@ -171,7 +171,7 @@ void Compositor::create() void Compositor::onSurfaceCreated(QWaylandSurface *surface) { connect(surface, &QWaylandSurface::surfaceDestroyed, this, &Compositor::surfaceDestroyed); - connect(surface, &QWaylandSurface::mappedChanged, this, &Compositor::surfaceMappedChanged); + connect(surface, &QWaylandSurface::hasContentChanged, this, &Compositor::surfaceHasContentChanged); connect(surface, &QWaylandSurface::redraw, this, &Compositor::triggerRender); connect(surface, &QWaylandSurface::subsurfacePositionChanged, this, &Compositor::onSubsurfacePositionChanged); @@ -184,14 +184,14 @@ void Compositor::onSurfaceCreated(QWaylandSurface *surface) connect(surface, &QWaylandSurface::offsetForNextFrame, view, &View::onOffsetForNextFrame); } -void Compositor::surfaceMappedChanged() +void Compositor::surfaceHasContentChanged() { QWaylandSurface *surface = qobject_cast<QWaylandSurface *>(sender()); - if (surface->isMapped()) { + if (surface->hasContent()) { if (surface->role() == QWaylandWlShellSurface::role() || surface->role() == QWaylandXdgSurface::role() || surface->role() == QWaylandXdgPopup::role()) { - defaultInputDevice()->setKeyboardFocus(surface); + defaultSeat()->setKeyboardFocus(surface); } } else if (popupActive()) { for (int i = 0; i < m_popupViews.count(); i++) { @@ -252,13 +252,13 @@ void Compositor::onXdgSurfaceCreated(QWaylandXdgSurface *xdgSurface) connect(xdgSurface, &QWaylandXdgSurface::unsetFullscreen, view, &View::onXdgUnsetFullscreen); } -void Compositor::onCreateXdgPopup(QWaylandSurface *surface, QWaylandSurface *parent, - QWaylandInputDevice *inputDevice, const QPoint &position, - const QWaylandResource &resource) +void Compositor::onXdgPopupRequested(QWaylandSurface *surface, QWaylandSurface *parent, + QWaylandSeat *seat, const QPoint &position, + const QWaylandResource &resource) { - Q_UNUSED(inputDevice); + Q_UNUSED(seat); - QWaylandXdgPopup *xdgPopup = new QWaylandXdgPopup(m_xdgShell, surface, parent, resource); + QWaylandXdgPopup *xdgPopup = new QWaylandXdgPopup(m_xdgShell, surface, parent, position, resource); View *view = findView(surface); Q_ASSERT(view); @@ -276,16 +276,16 @@ void Compositor::onStartMove() emit startMove(); } -void Compositor::onWlStartResize(QWaylandInputDevice *, QWaylandWlShellSurface::ResizeEdge edges) +void Compositor::onWlStartResize(QWaylandSeat *, QWaylandWlShellSurface::ResizeEdge edges) { closePopups(); emit startResize(int(edges), false); } -void Compositor::onXdgStartResize(QWaylandInputDevice *inputDevice, - QWaylandXdgSurface::ResizeEdge edges) +void Compositor::onXdgStartResize(QWaylandSeat *seat, + QWaylandXdgSurface::ResizeEdge edges) { - Q_UNUSED(inputDevice); + Q_UNUSED(seat); emit startResize(int(edges), true); } @@ -303,9 +303,9 @@ void Compositor::onSetTransient(QWaylandSurface *parent, const QPoint &relativeT } } -void Compositor::onSetPopup(QWaylandInputDevice *inputDevice, QWaylandSurface *parent, const QPoint &relativeToParent) +void Compositor::onSetPopup(QWaylandSeat *seat, QWaylandSurface *parent, const QPoint &relativeToParent) { - Q_UNUSED(inputDevice); + Q_UNUSED(seat); QWaylandWlShellSurface *surface = qobject_cast<QWaylandWlShellSurface*>(sender()); View *view = findView(surface->surface()); m_popupViews << view; @@ -374,7 +374,7 @@ void Compositor::adjustCursorSurface(QWaylandSurface *surface, int hotspotX, int m_cursorHotspotX = hotspotX; m_cursorHotspotY = hotspotY; - if (surface && surface->isMapped()) + if (surface && surface->hasContent()) updateCursor(); } @@ -395,7 +395,7 @@ void Compositor::handleMouseEvent(QWaylandView *target, QMouseEvent *me) && target->surface()->client() != m_popupViews.first()->surface()->client()) { closePopups(); } - QWaylandInputDevice *input = defaultInputDevice(); + QWaylandSeat *input = defaultSeat(); QWaylandSurface *surface = target ? target->surface() : nullptr; switch (me->type()) { case QEvent::MouseButtonPress: @@ -432,13 +432,13 @@ void Compositor::handleResize(View *target, const QSize &initialSize, const QPoi if (xdgSurface) { QWaylandXdgSurface::ResizeEdge edges = static_cast<QWaylandXdgSurface::ResizeEdge>(edge); QSize newSize = xdgSurface->sizeForResize(initialSize, delta, edges); - xdgSurface->requestResizing(newSize); + xdgSurface->sendResizing(newSize); } } void Compositor::startDrag() { - QWaylandDrag *currentDrag = defaultInputDevice()->drag(); + QWaylandDrag *currentDrag = defaultSeat()->drag(); Q_ASSERT(currentDrag); View *iconView = findView(currentDrag->icon()); iconView->setPosition(m_window->mapFromGlobal(QCursor::pos())); @@ -454,7 +454,7 @@ void Compositor::handleDrag(View *target, QMouseEvent *me) pos -= target->position(); surface = target->surface(); } - QWaylandDrag *currentDrag = defaultInputDevice()->drag(); + QWaylandDrag *currentDrag = defaultSeat()->drag(); currentDrag->dragMove(surface, pos); if (me->buttons() == Qt::NoButton) { m_views.removeOne(findView(currentDrag->icon())); diff --git a/examples/wayland/qwindow-compositor/compositor.h b/examples/wayland/qwindow-compositor/compositor.h index 8eec0a58f..3de25a9bb 100644 --- a/examples/wayland/qwindow-compositor/compositor.h +++ b/examples/wayland/qwindow-compositor/compositor.h @@ -119,12 +119,12 @@ signals: void frameOffset(const QPoint &offset); private slots: - void surfaceMappedChanged(); + void surfaceHasContentChanged(); void surfaceDestroyed(); void viewSurfaceDestroyed(); void onStartMove(); - void onWlStartResize(QWaylandInputDevice *inputDevice, QWaylandWlShellSurface::ResizeEdge edges); - void onXdgStartResize(QWaylandInputDevice *inputDevice, QWaylandXdgSurface::ResizeEdge edges); + void onWlStartResize(QWaylandSeat *seat, QWaylandWlShellSurface::ResizeEdge edges); + void onXdgStartResize(QWaylandSeat *seat, QWaylandXdgSurface::ResizeEdge edges); void startDrag(); @@ -133,10 +133,10 @@ private slots: void onSurfaceCreated(QWaylandSurface *surface); void onWlShellSurfaceCreated(QWaylandWlShellSurface *wlShellSurface); void onXdgSurfaceCreated(QWaylandXdgSurface *xdgSurface); - void onCreateXdgPopup(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandInputDevice *inputDevice, - const QPoint &position, const QWaylandResource &resource); + void onXdgPopupRequested(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandSeat *seat, + const QPoint &position, const QWaylandResource &resource); void onSetTransient(QWaylandSurface *parentSurface, const QPoint &relativeToParent, QWaylandWlShellSurface::FocusPolicy focusPolicy); - void onSetPopup(QWaylandInputDevice *inputDevice, QWaylandSurface *parent, const QPoint &relativeToParent); + void onSetPopup(QWaylandSeat *seat, QWaylandSurface *parent, const QPoint &relativeToParent); void onSubsurfaceChanged(QWaylandSurface *child, QWaylandSurface *parent); void onSubsurfacePositionChanged(const QPoint &position); diff --git a/examples/wayland/qwindow-compositor/window.cpp b/examples/wayland/qwindow-compositor/window.cpp index c3fc9b7df..b73c7be39 100644 --- a/examples/wayland/qwindow-compositor/window.cpp +++ b/examples/wayland/qwindow-compositor/window.cpp @@ -47,7 +47,7 @@ #include <QMatrix4x4> #include "compositor.h" -#include <QtWaylandCompositor/qwaylandinput.h> +#include <QtWaylandCompositor/qwaylandseat.h> Window::Window() : m_backgroundTexture(0) @@ -129,7 +129,7 @@ void Window::paintGL() m_textureBlitter.bind(currentTarget); } QWaylandSurface *surface = view->surface(); - if (surface && surface->isMapped()) { + if (surface && surface->hasContent()) { QSize s = surface->size(); if (!s.isEmpty()) { if (m_mouseView == view && m_grabState == ResizeGrab && m_resizeAnchored) @@ -268,10 +268,10 @@ void Window::sendMouseEvent(QMouseEvent *e, View *target) void Window::keyPressEvent(QKeyEvent *e) { - m_compositor->defaultInputDevice()->sendKeyPressEvent(e->nativeScanCode()); + m_compositor->defaultSeat()->sendKeyPressEvent(e->nativeScanCode()); } void Window::keyReleaseEvent(QKeyEvent *e) { - m_compositor->defaultInputDevice()->sendKeyReleaseEvent(e->nativeScanCode()); + m_compositor->defaultSeat()->sendKeyReleaseEvent(e->nativeScanCode()); } diff --git a/examples/wayland/qwindow-compositor/window.h b/examples/wayland/qwindow-compositor/window.h index 9a01e2831..53c85a6ef 100644 --- a/examples/wayland/qwindow-compositor/window.h +++ b/examples/wayland/qwindow-compositor/window.h @@ -43,7 +43,7 @@ #include <QOpenGLWindow> #include <QPointer> -#include <QtGui/private/qopengltextureblitter_p.h> +#include <QOpenGLTextureBlitter> QT_BEGIN_NAMESPACE diff --git a/examples/wayland/server-buffer/compositor/main.cpp b/examples/wayland/server-buffer/compositor/main.cpp index 57ca647b6..9c5ee42a1 100644 --- a/examples/wayland/server-buffer/compositor/main.cpp +++ b/examples/wayland/server-buffer/compositor/main.cpp @@ -219,7 +219,7 @@ protected: void onSurfaceCreated(QWaylandSurface *surface) { QWaylandQuickItem *item = new QWaylandQuickItem(); item->setSurface(surface); - connect(surface, &QWaylandSurface::mappedChanged, this, &QmlCompositor::surfaceMapped); + connect(surface, &QWaylandSurface::hasContentChanged, this, &QmlCompositor::surfaceMapped); } void share_buffer_bind_resource(Resource *resource) Q_DECL_OVERRIDE diff --git a/examples/wayland/wayland.pro b/examples/wayland/wayland.pro index 503190c8a..d4b631403 100644 --- a/examples/wayland/wayland.pro +++ b/examples/wayland/wayland.pro @@ -1,13 +1,14 @@ TEMPLATE=subdirs -SUBDIRS += qwindow-compositor -SUBDIRS += minimal-cpp +contains(QT_CONFIG, opengl) { + SUBDIRS += qwindow-compositor + SUBDIRS += minimal-cpp +} -qtHaveModule(quick) { +contains(QT_CONFIG, opengl):qtHaveModule(quick) { SUBDIRS += minimal-qml SUBDIRS += pure-qml SUBDIRS += multi-output SUBDIRS += custom-extension + SUBDIRS += server-buffer } - -SUBDIRS += server-buffer |