diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2017-03-01 15:47:21 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2017-03-01 15:48:39 +0100 |
commit | a259232f3a661b8916497b056cb3d50c396c3d94 (patch) | |
tree | 0e73cb46bc78ece0db7e02cd5323018def74e09b | |
parent | 852610be9406a46997b5e22e0988e840e8673bf0 (diff) | |
parent | 7d527c1914710a511c06713bbda1572b767cea34 (diff) | |
download | qtwayland-a259232f3a661b8916497b056cb3d50c396c3d94.tar.gz |
Merge remote-tracking branch 'qt/5.8' into 5.9
Change-Id: I43cd0147a63b5523e3112f09bbfe60e1d6636e6c
23 files changed, 153 insertions, 24 deletions
diff --git a/dist/changes-5.8.0 b/dist/changes-5.8.0 new file mode 100644 index 00000000..6fd73eb1 --- /dev/null +++ b/dist/changes-5.8.0 @@ -0,0 +1,84 @@ +Qt 5.8 introduces many new features and improvements as well as bugfixes +over the 5.7.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + + http://doc.qt.io/qt-5/index.html + +The Qt version 5.8 series is binary compatible with the 5.7.x series. +Applications compiled for 5.7 will continue to run with 5.8. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt Wayland QPA Plugin * +**************************************************************************** + +- Fix show/hide: destroy the Wayland surface instead of attaching a + null buffer. This fixes an xdg-shell protocol error, close animations, + and problems with hide on some EGL drivers. + +- Fix crash when trying to run on a compositor without outputs + +- Fix bug that updated the Wayland cursor on every mouse move + +- XDG shell: popup fixes + +- Fix geometry when FramelessWindowHint is changed + +- Allow running without any shell extension + +- Multiple stability improvements + + +**************************************************************************** +* Qt Wayland Compositor API * +**************************************************************************** + +QtWaylandCompositor is now officially released. It is not source or binary +compatible with the tech preview released with Qt 5.7. From now on the +normal Qt compatibility guarantees apply, so QtWaylandCompositor 5.8 will +be source and binary compatible with Qt 5.9. + +- Add IVI application support for Qt-based compositors + +- General API renaming + * Rename isShm -> isSharedMemory + and BufferType_Shm -> BufferType_SharedMemory + * Rename inputDevice -> seat + * Rename throttlingView -> primaryView + * Rename isMapped -> hasContent + * Rename bufferLock -> bufferLocked + * Rename discardFrontBuffers -> allowDiscardFrontBuffer + * Rename QWaylandView::attach() -> bufferCommitted() + * Rename XdgShell -> XdgShellV5 + * Rename enableWSCursor -> windowSystemCursorEnabled + * Rename signals: + - createSurface -> surfaceRequested + - createXdgSurface -> xdgSurfaceRequested + - createXdgPopup -> xdgPopupRequested + - createShellSurface -> wlShellSurfaceRequested + - shellSurfaceCreated -> wlShellSurfaceCreated + +- Major QML API Changes + * View is removed from the Qt Quick API (use WaylandItem instead) + * Changing keymap from QML is now supported + * QWaylandDrag is now available to QML as WaylandDrag + +- Major C++ API changes + * New texture/buffer handling: bindToTexture() is replaced by + toOpenGLTexture() which returns a QOpenGLTexture. + * New and improved keymap support + * New and improved mode support (monitor size/refresh rate) + * Remove touch focus, allowing touch input to multiple clients + at the same time + * Add common QWaylandShell base class + +- Behavior changes + * sizeFollowsWindow now defaults to false + * Touch events are now enabled by default for Qt Quick compositors diff --git a/src/client/configure.json b/src/client/configure.json index b2a8fbc0..ea0bbe22 100644 --- a/src/client/configure.json +++ b/src/client/configure.json @@ -82,7 +82,7 @@ "output": [ "privateFeature" ] }, "wayland-brcm": { - "label": "Rasberry Pi", + "label": "Raspberry Pi", "condition": "features.wayland-client && features.eglfs_brcm", "output": [ "privateFeature" ] }, diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index 851d715b..8e4c8d67 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -421,7 +421,14 @@ void QWaylandDisplay::handleKeyboardFocusChanged(QWaylandInputDevice *inputDevic if (mLastKeyboardFocus == keyboardFocus) return; - mWaylandIntegration->mShellIntegration->handleKeyboardFocusChanged(keyboardFocus, mLastKeyboardFocus); + if (mWaylandIntegration->mShellIntegration) { + mWaylandIntegration->mShellIntegration->handleKeyboardFocusChanged(keyboardFocus, mLastKeyboardFocus); + } else { + if (keyboardFocus) + handleWindowActivated(keyboardFocus); + if (mLastKeyboardFocus) + handleWindowDeactivated(mLastKeyboardFocus); + } mLastKeyboardFocus = keyboardFocus; } diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 75c5b2f9..a42c4796 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -95,6 +95,7 @@ QWaylandWindow::QWaylandWindow(QWindow *window) { static WId id = 1; mWindowId = id++; + initializeWlSurface(); } QWaylandWindow::~QWaylandWindow() @@ -127,7 +128,7 @@ void QWaylandWindow::initWindow() return; if (!isInitialized()) - init(mDisplay->createSurface(static_cast<QtWayland::wl_surface *>(this))); + initializeWlSurface(); if (shouldCreateSubSurface()) { Q_ASSERT(!mSubSurfaceWindow); @@ -200,6 +201,11 @@ void QWaylandWindow::initWindow() mFlags = window()->flags(); } +void QWaylandWindow::initializeWlSurface() +{ + init(mDisplay->createSurface(static_cast<QtWayland::wl_surface *>(this))); +} + bool QWaylandWindow::shouldCreateShellSurface() const { if (shouldCreateSubSurface()) @@ -225,7 +231,8 @@ void QWaylandWindow::reset() mShellSurface = 0; delete mSubSurfaceWindow; mSubSurfaceWindow = 0; - destroy(); + if (isInitialized()) + destroy(); if (mFrameCallback) wl_callback_destroy(mFrameCallback); @@ -360,8 +367,11 @@ void QWaylandWindow::setMask(const QRegion &mask) mMask = mask; + if (!isInitialized()) + return; + if (mMask.isEmpty()) { - set_input_region(0); + set_input_region(nullptr); } else { struct ::wl_region *region = mDisplay->createRegion(mMask); set_input_region(region); diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index e67cf0af..8e72b107 100644 --- a/src/client/qwaylandwindow_p.h +++ b/src/client/qwaylandwindow_p.h @@ -248,6 +248,7 @@ private: bool setWindowStateInternal(Qt::WindowState flags); void setGeometry_helper(const QRect &rect); void initWindow(); + void initializeWlSurface(); bool shouldCreateShellSurface() const; bool shouldCreateSubSurface() const; void reset(); diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp index ee9fa542..a39eff9e 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.cpp +++ b/src/compositor/compositor_api/qwaylandquickitem.cpp @@ -678,8 +678,11 @@ void QWaylandQuickItem::touchEvent(QTouchEvent *event) void QWaylandQuickItem::touchUngrabEvent() { Q_D(QWaylandQuickItem); - for (auto seat : d->touchingSeats) - seat->sendTouchCancelEvent(surface()->client()); + + if (d->shouldSendInputEvents()) + for (auto seat : d->touchingSeats) + seat->sendTouchCancelEvent(surface()->client()); + d->touchingSeats.clear(); } diff --git a/src/compositor/configure.json b/src/compositor/configure.json index 2ddccd98..52365fe3 100644 --- a/src/compositor/configure.json +++ b/src/compositor/configure.json @@ -67,7 +67,7 @@ "output": [ "privateFeature" ] }, "wayland-brcm": { - "label": "Rasberry Pi", + "label": "Raspberry Pi", "condition": "features.wayland-server && features.eglfs_brcm", "output": [ "privateFeature" ] }, diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h b/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h index b9eb5ad6..4cd1ebb7 100644 --- a/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h +++ b/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h @@ -72,7 +72,7 @@ public: QQuickItem *m_moveItem; }; -class QWaylandQuickShellIntegration : public QObject +class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandQuickShellIntegration : public QObject { Q_OBJECT public: diff --git a/src/compositor/extensions/qwaylandxdgshellv5.cpp b/src/compositor/extensions/qwaylandxdgshellv5.cpp index 80aa52e7..82171c40 100644 --- a/src/compositor/extensions/qwaylandxdgshellv5.cpp +++ b/src/compositor/extensions/qwaylandxdgshellv5.cpp @@ -1103,6 +1103,7 @@ void QWaylandXdgPopupV5::initialize(QWaylandXdgShellV5 *shell, QWaylandSurface * emit shellChanged(); emit surfaceChanged(); emit parentSurfaceChanged(); + emit positionChanged(); QWaylandCompositorExtension::initialize(); } diff --git a/src/compositor/extensions/qwaylandxdgshellv5.h b/src/compositor/extensions/qwaylandxdgshellv5.h index 269ea893..4adf0f9b 100644 --- a/src/compositor/extensions/qwaylandxdgshellv5.h +++ b/src/compositor/extensions/qwaylandxdgshellv5.h @@ -212,7 +212,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgPopupV5 : public QWaylandShellSurfa Q_PROPERTY(QWaylandXdgShellV5 *shell READ shell NOTIFY shellChanged) Q_PROPERTY(QWaylandSurface *surface READ surface NOTIFY surfaceChanged) Q_PROPERTY(QWaylandSurface *parentSurface READ parentSurface NOTIFY parentSurfaceChanged) - Q_PROPERTY(QPoint position READ position) + Q_PROPERTY(QPoint position READ position NOTIFY positionChanged) public: QWaylandXdgPopupV5(); @@ -245,6 +245,7 @@ Q_SIGNALS: void shellChanged(); void surfaceChanged(); void parentSurfaceChanged(); + void positionChanged(); private: void initialize() override; diff --git a/src/hardwareintegration/client/brcm-egl/brcm-egl.pri b/src/hardwareintegration/client/brcm-egl/brcm-egl.pri index 64cb4467..3961f4f1 100644 --- a/src/hardwareintegration/client/brcm-egl/brcm-egl.pri +++ b/src/hardwareintegration/client/brcm-egl/brcm-egl.pri @@ -3,6 +3,8 @@ INCLUDEPATH += $$PWD QMAKE_USE += egl wayland-client QT += egl_support-private +LIBS_PRIVATE += $$QMAKE_LIBS_DYNLOAD + SOURCES += $$PWD/qwaylandbrcmeglintegration.cpp \ $$PWD/qwaylandbrcmglcontext.cpp \ $$PWD/qwaylandbrcmeglwindow.cpp diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp index 4d56d66e..22618b4a 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.cpp @@ -254,7 +254,7 @@ void QWaylandBrcmEglWindow::swapBuffers() m_buffers[m_current]->bind(); attach(m_buffers[m_current], 0, 0); damage(QRect(QPoint(), geometry().size())); - commit(); + wl_surface::commit(); m_current = (m_current + 1) % m_count; m_buffers[m_current]->waitForRelease(); diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp index f5480b0e..5c585746 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.cpp @@ -48,6 +48,8 @@ #include <qpa/qplatformopenglcontext.h> #include <QtGui/QSurfaceFormat> +#include <dlfcn.h> + QT_BEGIN_NAMESPACE namespace QtWaylandClient { @@ -92,9 +94,12 @@ void QWaylandBrcmGLContext::swapBuffers(QPlatformSurface *surface) static_cast<QWaylandBrcmEglWindow *>(surface)->swapBuffers(); } -void (*QWaylandBrcmGLContext::getProcAddress(const char *procName)) () +QFunctionPointer QWaylandBrcmGLContext::getProcAddress(const char *procName) { - return eglGetProcAddress(procName); + QFunctionPointer proc = (QFunctionPointer) eglGetProcAddress(procName); + if (!proc) + proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName); + return proc; } EGLConfig QWaylandBrcmGLContext::eglConfig() const diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h index ee8bc86f..d2733357 100644 --- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h +++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h @@ -63,7 +63,7 @@ public: bool makeCurrent(QPlatformSurface *surface) override; void doneCurrent() override; - void (*getProcAddress(const char *procName)) () override; + QFunctionPointer getProcAddress(const char *procName) override; QSurfaceFormat format() const override { return m_format; } diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp index f70c75a3..2a9e39ed 100644 --- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp +++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp @@ -59,6 +59,8 @@ #include <QtCore/qmutex.h> +#include <dlfcn.h> + // Constants from EGL_KHR_create_context #ifndef EGL_CONTEXT_MINOR_VERSION_KHR #define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB @@ -575,9 +577,12 @@ bool QWaylandGLContext::isValid() const return m_context != EGL_NO_CONTEXT; } -void (*QWaylandGLContext::getProcAddress(const char *procName)) () +QFunctionPointer QWaylandGLContext::getProcAddress(const char *procName) { - return eglGetProcAddress(procName); + QFunctionPointer proc = (QFunctionPointer) eglGetProcAddress(procName); + if (!proc) + proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName); + return proc; } EGLConfig QWaylandGLContext::eglConfig() const diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp index 439acc00..33ae2e03 100644 --- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp +++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.cpp @@ -45,6 +45,8 @@ #include <QRegion> +#include <dlfcn.h> + QT_BEGIN_NAMESPACE namespace QtWaylandClient { @@ -94,9 +96,12 @@ void QWaylandXCompositeGLXContext::swapBuffers(QPlatformSurface *surface) w->waitForFrameSync(); } -void (*QWaylandXCompositeGLXContext::getProcAddress(const char *procName)) () +QFunctionPointer QWaylandXCompositeGLXContext::getProcAddress(const char *procName) { - return glXGetProcAddress(reinterpret_cast<const GLubyte *>(procName)); + QFunctionPointer proc = glXGetProcAddress(reinterpret_cast<const GLubyte *>(procName)); + if (!proc) + proc = (QFunctionPointer) dlsym(RTLD_DEFAULT, procName); + return proc; } QSurfaceFormat QWaylandXCompositeGLXContext::format() const diff --git a/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri b/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri index 067378af..2307319a 100644 --- a/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri +++ b/src/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pri @@ -3,6 +3,8 @@ include ($$PWD/../xcomposite_share/xcomposite_share.pri) QMAKE_USE += wayland-client glx +LIBS_PRIVATE += $$QMAKE_LIBS_DYNLOAD + QT += glx_support-private SOURCES += \ diff --git a/src/imports/compositor/compositor.pro b/src/imports/compositor/compositor.pro index a97f90f4..26cbe474 100644 --- a/src/imports/compositor/compositor.pro +++ b/src/imports/compositor/compositor.pro @@ -15,6 +15,8 @@ COMPOSITOR_QML_FILES += \ WaylandCursorItem.qml \ qmldir +DEFINES += QT_WAYLAND_COMPOSITOR_QUICK + # Create the resource file GENERATED_RESOURCE_FILE = $$OUT_PWD/compositor.qrc diff --git a/src/imports/compositor/qwaylandquickcompositorplugin.cpp b/src/imports/compositor/qwaylandquickcompositorplugin.cpp index 4444c953..f181decf 100644 --- a/src/imports/compositor/qwaylandquickcompositorplugin.cpp +++ b/src/imports/compositor/qwaylandquickcompositorplugin.cpp @@ -144,6 +144,7 @@ public: qmlRegisterUncreatableType<QWaylandXdgShellV5>(uri, 1, 0, "XdgShellV5Base", QObject::tr("Cannot create instance of XdgShellV5Base")); qmlRegisterType<QWaylandXdgShellV5QuickExtension>(uri, 1, 0, "XdgShellV5"); qmlRegisterType<QWaylandXdgSurfaceV5>(uri, 1, 0, "XdgSurfaceV5"); + qmlRegisterType<QWaylandXdgPopupV5>(uri, 1, 0, "XdgPopupV5"); qmlRegisterType<QWaylandTextInputManagerQuickExtension>(uri, 1, 0, "TextInputManager"); } }; diff --git a/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp b/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp index 07222f23..585285fa 100644 --- a/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp +++ b/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp @@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE namespace QtWaylandClient { -class QWaylandXCompositeEglClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin +class QWaylandXCompositeEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-egl.json") @@ -52,7 +52,7 @@ public: QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override; }; -QWaylandClientBufferIntegration *QWaylandXCompositeEglClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList) +QWaylandClientBufferIntegration *QWaylandXCompositeEglClientBufferPlugin::create(const QString& system, const QStringList& paramList) { Q_UNUSED(paramList); Q_UNUSED(system); diff --git a/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro b/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro index c8734084..83bd4fe8 100644 --- a/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro +++ b/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro @@ -11,5 +11,5 @@ SOURCES += \ main.cpp PLUGIN_TYPE = wayland-graphics-integration-client -PLUGIN_CLASS_NAME = QWaylandXCompositeEglClientBufferIntegrationPlugin +PLUGIN_CLASS_NAME = QWaylandXCompositeEglClientBufferPlugin load(qt_plugin) diff --git a/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp b/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp index 00fa255b..f7b878d9 100644 --- a/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp +++ b/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp @@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE namespace QtWaylandClient { -class QWaylandXCompositeGlxClientBufferIntegrationPlugin : public QWaylandClientBufferIntegrationPlugin +class QWaylandXCompositeGlxClientBufferPlugin : public QWaylandClientBufferIntegrationPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-glx.json") @@ -52,7 +52,7 @@ public: QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override; }; -QWaylandClientBufferIntegration *QWaylandXCompositeGlxClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList) +QWaylandClientBufferIntegration *QWaylandXCompositeGlxClientBufferPlugin::create(const QString& system, const QStringList& paramList) { Q_UNUSED(paramList); Q_UNUSED(system); diff --git a/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pro b/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pro index fb5ad15f..804ca386 100644 --- a/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pro +++ b/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pro @@ -8,5 +8,5 @@ SOURCES += \ main.cpp PLUGIN_TYPE = wayland-graphics-integration-client -PLUGIN_CLASS_NAME = QWaylandXCompositeGlxClientBufferIntegrationPlugin +PLUGIN_CLASS_NAME = QWaylandXCompositeGlxClientBufferPlugin load(qt_plugin) |