diff options
author | Liang Qi <liang.qi@qt.io> | 2017-01-26 01:05:17 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-01-26 01:05:17 +0100 |
commit | df015bd2e40e7654b2515996d5bd82469542581a (patch) | |
tree | a36b7e9b2c9a7ccc1158d004c7b4a325200bb261 /src | |
parent | f72d63866d3f5820865fcd309b649dc9932518ee (diff) | |
parent | 0e2a950895805457a45abe860bc91a7cc4ba405e (diff) |
Merge remote-tracking branch 'origin/5.8.0' into 5.8
Conflicts:
src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
Change-Id: Ie45a13d3c866d0503e6e31b2a53b70f3420c5066
Diffstat (limited to 'src')
12 files changed, 39 insertions, 11 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 8087921a6..58848096a 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 80aa52e70..82171c40b 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 269ea8934..4adf0f9b8 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 64cb44677..3961f4f1e 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 4d56d66e6..22618b4aa 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 f5480b0ed..5c585746c 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 ee8bc86fe..d27333576 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 f70c75a33..2a9e39ed6 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 439acc00c..33ae2e038 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 067378af1..2307319af 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 a97f90f48..26cbe4744 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 4444c953b..f181decf7 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"); } }; |