diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2016-11-23 13:29:22 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2016-11-23 13:36:04 +0100 |
commit | 767ee09aba517b0c680dd67a0f213a483429b65f (patch) | |
tree | 4b18a790aaa5c05a704decb88c19de41934a0a31 /examples | |
parent | 0e5b26942c9ff8b85322a63f577bd7a91ff0851a (diff) | |
parent | 36dcbb054ec84f6d93d755d905ad3d9bcadb2900 (diff) |
Merge remote-tracking branch 'qt/5.8' into dev
Change-Id: I8a9455105e8e3519f6a860f58820382d7e337b1e
Diffstat (limited to 'examples')
10 files changed, 19 insertions, 60 deletions
diff --git a/examples/wayland/custom-extension/client-common/client.pro b/examples/wayland/custom-extension/client-common/client.pro index 9ba72bc9c..95b99578a 100644 --- a/examples/wayland/custom-extension/client-common/client.pro +++ b/examples/wayland/custom-extension/client-common/client.pro @@ -1,14 +1,7 @@ CONFIG += wayland-scanner -CONFIG += link_pkgconfig - TARGET = custom-wayland QT += waylandclient-private -!contains(QT_CONFIG, no-pkg-config) { - PKGCONFIG += wayland-client -} else { - LIBS += -lwayland-client -} WAYLANDCLIENTSOURCES += ../protocol/custom.xml diff --git a/examples/wayland/custom-extension/compositor/compositor.pro b/examples/wayland/custom-extension/compositor/compositor.pro index 4ffafdb8b..b0ff7b2f7 100644 --- a/examples/wayland/custom-extension/compositor/compositor.pro +++ b/examples/wayland/custom-extension/compositor/compositor.pro @@ -18,13 +18,6 @@ WAYLANDSERVERSOURCES += \ RESOURCES += compositor.qrc -contains(QT_CONFIG, no-pkg-config) { - LIBS += -lwayland-server -} else { - CONFIG += link_pkgconfig - PKGCONFIG += wayland-server -} - TARGET = custom-compositor HEADERS += \ diff --git a/examples/wayland/custom-extension/cpp-client/cpp-client.pro b/examples/wayland/custom-extension/cpp-client/cpp-client.pro index 54fead078..b700f2367 100644 --- a/examples/wayland/custom-extension/cpp-client/cpp-client.pro +++ b/examples/wayland/custom-extension/cpp-client/cpp-client.pro @@ -1,17 +1,8 @@ QT += waylandclient-private gui-private - -CONFIG += c++11 CONFIG += wayland-scanner -CONFIG += link_pkgconfig WAYLANDCLIENTSOURCES += ../protocol/custom.xml -!contains(QT_CONFIG, no-pkg-config) { - PKGCONFIG += wayland-client -} else { - LIBS += -lwayland-client -} - SOURCES += main.cpp \ ../client-common/customextension.cpp diff --git a/examples/wayland/custom-extension/qml-client/qml-client.pro b/examples/wayland/custom-extension/qml-client/qml-client.pro index aec29d2b3..d45067e5a 100644 --- a/examples/wayland/custom-extension/qml-client/qml-client.pro +++ b/examples/wayland/custom-extension/qml-client/qml-client.pro @@ -1,19 +1,9 @@ TEMPLATE = app - QT += qml quick waylandclient-private - -CONFIG += c++11 CONFIG += wayland-scanner -CONFIG += link_pkgconfig WAYLANDCLIENTSOURCES += ../protocol/custom.xml -!contains(QT_CONFIG, no-pkg-config) { - PKGCONFIG += wayland-client -} else { - LIBS += -lwayland-client -} - SOURCES += main.cpp \ ../client-common/customextension.cpp diff --git a/examples/wayland/pure-qml/qml/Chrome.qml b/examples/wayland/pure-qml/qml/Chrome.qml index d2ff5cc2a..dc3ad4731 100644 --- a/examples/wayland/pure-qml/qml/Chrome.qml +++ b/examples/wayland/pure-qml/qml/Chrome.qml @@ -44,6 +44,8 @@ import QtWayland.Compositor 1.0 ShellSurfaceItem { id: rootChrome + property bool isChild: parent.shellSurface !== undefined + onSurfaceDestroyed: { bufferLocked = true; destroyAnimation.start(); @@ -67,6 +69,7 @@ ShellSurfaceItem { ParallelAnimation { NumberAnimation { target: scaleTransform; property: "yScale"; to: 2/height; duration: 150 } NumberAnimation { target: scaleTransform; property: "xScale"; to: 0.4; duration: 150 } + NumberAnimation { target: rootChrome; property: "opacity"; to: rootChrome.isChild ? 0 : 1; duration: 150 } } NumberAnimation { target: scaleTransform; property: "xScale"; to: 0; duration: 150 } ScriptAction { script: { rootChrome.destroy(); } } diff --git a/examples/wayland/pure-qml/qml/main.qml b/examples/wayland/pure-qml/qml/main.qml index 9bce7bcb8..5eece078b 100644 --- a/examples/wayland/pure-qml/qml/main.qml +++ b/examples/wayland/pure-qml/qml/main.qml @@ -81,7 +81,8 @@ WaylandCompositor { } onXdgPopupCreated: { var parentView = viewsBySurface[xdgPopup.parentSurface]; - chromeComponent.createObject(parentView, { "shellSurface": xdgPopup } ); + var item = chromeComponent.createObject(parentView, { "shellSurface": xdgPopup } ); + viewsBySurface[xdgPopup.surface] = item; } } diff --git a/examples/wayland/qwindow-compositor/window.cpp b/examples/wayland/qwindow-compositor/window.cpp index 371e0de80..a61e4d98a 100644 --- a/examples/wayland/qwindow-compositor/window.cpp +++ b/examples/wayland/qwindow-compositor/window.cpp @@ -257,10 +257,9 @@ void Window::mouseMoveEvent(QMouseEvent *e) void Window::sendMouseEvent(QMouseEvent *e, View *target) { - if (!target) - return; - - QPointF mappedPos = e->localPos() - target->position(); + QPointF mappedPos = e->localPos(); + if (target) + mappedPos -= target->position(); QMouseEvent viewEvent(e->type(), mappedPos, e->localPos(), e->button(), e->buttons(), e->modifiers()); m_compositor->handleMouseEvent(target, &viewEvent); } diff --git a/examples/wayland/server-buffer/client/client.pro b/examples/wayland/server-buffer/client/client.pro index 6e5cc87e6..459a407a4 100644 --- a/examples/wayland/server-buffer/client/client.pro +++ b/examples/wayland/server-buffer/client/client.pro @@ -3,14 +3,6 @@ TARGET = client INCLUDEPATH += . QT += waylandclient-private - -contains(QT_CONFIG, no-pkg-config) { - LIBS += -lwayland-client -} else { - CONFIG += link_pkgconfig - PKGCONFIG += wayland-client -} - CONFIG += wayland-scanner WAYLANDCLIENTSOURCES += ../share-buffer.xml diff --git a/examples/wayland/server-buffer/compositor/compositor.pro b/examples/wayland/server-buffer/compositor/compositor.pro index 28a781bd0..45240af91 100644 --- a/examples/wayland/server-buffer/compositor/compositor.pro +++ b/examples/wayland/server-buffer/compositor/compositor.pro @@ -1,12 +1,5 @@ QT += core-private gui-private quick-private waylandcompositor-private -contains(QT_CONFIG, no-pkg-config) { - LIBS += -lwayland-server -} else { - CONFIG += link_pkgconfig - PKGCONFIG += wayland-server -} - SOURCES += \ main.cpp \ serverbufferitem.cpp diff --git a/examples/wayland/wayland.pro b/examples/wayland/wayland.pro index 2a5395004..6024dd2dd 100644 --- a/examples/wayland/wayland.pro +++ b/examples/wayland/wayland.pro @@ -1,17 +1,21 @@ +requires(qtHaveModule(waylandcompositor)) +requires(qtConfig(opengl)) TEMPLATE=subdirs -contains(QT_CONFIG, opengl) { - SUBDIRS += qwindow-compositor - SUBDIRS += minimal-cpp -} +SUBDIRS += \ + qwindow-compositor + minimal-cpp -contains(QT_CONFIG, opengl):qtHaveModule(quick) { +qtHaveModule(quick) { SUBDIRS += minimal-qml SUBDIRS += spanning-screens SUBDIRS += pure-qml SUBDIRS += multi-output SUBDIRS += multi-screen - SUBDIRS += custom-extension - SUBDIRS += server-buffer SUBDIRS += ivi-compositor + qtHaveModule(waylandclient) { + SUBDIRS += \ + custom-extension \ + server-buffer + } } |