diff options
13 files changed, 123 insertions, 11 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/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 8087921a..58848096 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -225,7 +225,8 @@ void QWaylandWindow::reset() mShellSurface = 0; delete mSubSurfaceWindow; mSubSurfaceWindow = 0; - destroy(); + if (isInitialized()) + destroy(); if (mFrameCallback) wl_callback_destroy(mFrameCallback); @@ -353,8 +354,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/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"); } }; |