summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-08-17 10:48:22 +0200
committerLiang Qi <liang.qi@qt.io>2017-08-17 10:48:28 +0200
commite99dae74353e5652794d7bcbcd3d79b1478debbc (patch)
tree6d0ab88f8aa6f464e66429899418f1adf63b0651
parente3feecfd96d8fcd65556d325c806153a3495d5b3 (diff)
parent7f70da6a644bc5b690066f0ab4814e1358f57e81 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: .qmake.conf Change-Id: Ia0f9d099e92a40cae7ec506781f70c56415bcf89
-rw-r--r--.gitignore5
-rw-r--r--dist/changes-5.9.150
-rw-r--r--examples/wayland/ivi-compositor/.gitignore1
-rw-r--r--examples/wayland/ivi-compositor/doc/src/ivi-compositor.qdoc44
-rw-r--r--examples/wayland/minimal-qml/doc/src/minimal-qml.qdoc36
-rw-r--r--examples/wayland/multi-screen/.gitignore1
-rw-r--r--examples/wayland/multi-screen/doc/src/multi-screen.qdoc45
-rw-r--r--examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc36
-rw-r--r--src/client/configure.json3
-rw-r--r--src/client/qwaylandinputcontext.cpp6
-rw-r--r--src/client/qwaylandwindow.cpp6
-rw-r--r--src/client/qwaylandxdgshellv6.cpp10
-rw-r--r--src/client/qwaylandxdgshellv6_p.h2
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp2
-rw-r--r--src/compositor/compositor_api/qwaylandseat.h1
-rw-r--r--src/compositor/configure.json3
-rw-r--r--src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp13
17 files changed, 251 insertions, 13 deletions
diff --git a/.gitignore b/.gitignore
index b841728fa..bb3819ca3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,8 @@ qwayland-server-*.h
*-protocol.c
*-client-protocol.h
*-server-protocol.h
+qtwayland*-config.*
+qtwayland*-config_p.h
.qmake.cache
config.log
config.tests/egl/egl
@@ -23,6 +25,9 @@ config.tests/xkbcommon/xkbcommon
config.tests/wayland/wayland
config.tests/drm_egl_server/drm_egl_server
config.tests/wayland_scanner/wayland_scanner
+config.cache
+config.opt
+config.summary
qrc_*.cpp
moc_*.cpp
.obj/
diff --git a/dist/changes-5.9.1 b/dist/changes-5.9.1
new file mode 100644
index 000000000..92cdcf953
--- /dev/null
+++ b/dist/changes-5.9.1
@@ -0,0 +1,50 @@
+Qt 5.9.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.9.0.
+
+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.9 series is binary compatible with the 5.8.x series.
+Applications compiled for 5.8 will continue to run with 5.9. Exception:
+between Qt 5.8.0 and 5.9.0 the QWaylandQuickOutput class was changed
+in a binary incompatible way.
+
+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 General *
+****************************************************************************
+
+ - [QTBUG-61183] Fix build issue when libhybris is installed.
+
+ - Fix build issue when X11 is not installed.
+
+
+****************************************************************************
+* Qt Wayland QPA Plugin *
+****************************************************************************
+
+ - [QTBUG-55956] Fix windows with WA_TranslucentBackground on Weston.
+
+ - Fix double delete in Broadcom plugin.
+
+ - Fix issues with high-DPI scaling.
+
+ - Make sure cursor is set correctly when the pointer enters the window.
+
+ - Fix keyboard modifiers for mouse wheel events.
+
+
+****************************************************************************
+* Qt Wayland Compositor API *
+****************************************************************************
+
+- This release contains only minor code improvements in the compositor API.
diff --git a/examples/wayland/ivi-compositor/.gitignore b/examples/wayland/ivi-compositor/.gitignore
new file mode 100644
index 000000000..4477704e2
--- /dev/null
+++ b/examples/wayland/ivi-compositor/.gitignore
@@ -0,0 +1 @@
+ivi-compositor
diff --git a/examples/wayland/ivi-compositor/doc/src/ivi-compositor.qdoc b/examples/wayland/ivi-compositor/doc/src/ivi-compositor.qdoc
new file mode 100644
index 000000000..ae37c8950
--- /dev/null
+++ b/examples/wayland/ivi-compositor/doc/src/ivi-compositor.qdoc
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ * \title Qt Wayland Compositor Examples - IVI Compositor
+ * \example ivi-compositor
+ * \brief IVI Compositor is an example that demonstrates how to use the IviApplication extension.
+ * \ingroup qtwaylandcompositor-examples
+ *
+ * IVI Compositor is a Wayland compositor example demonstrating how to create a
+ * compositor supporting the \c ivi-application protocol.
+ *
+ * IVI application windows with the id 1337 will be resized to cover one half
+ * of the screen, while all other windows will be resized to cover the other
+ * half.
+ *
+ * To start a Qt application using the \c ivi-application protocol with the
+ * right id, you need to set QT_WAYLAND_SHELL_INTEGRATION to ivi-shell and
+ * QT_IVI_SURFACE_ID to 1337.
+ */
diff --git a/examples/wayland/minimal-qml/doc/src/minimal-qml.qdoc b/examples/wayland/minimal-qml/doc/src/minimal-qml.qdoc
new file mode 100644
index 000000000..24a5f6522
--- /dev/null
+++ b/examples/wayland/minimal-qml/doc/src/minimal-qml.qdoc
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ * \title Qt Wayland Compositor Examples - Minimal QML
+ * \example minimal-qml
+ * \brief Minimal QML is a simple example that demonstrates how to write a Wayland compositor in QML.
+ * \ingroup qtwaylandcompositor-examples
+ *
+ * Minimal QML is a desktop-style Wayland compositor example implementing a
+ * complete Qt Wayland Compositor with as little code as possible.
+ */
diff --git a/examples/wayland/multi-screen/.gitignore b/examples/wayland/multi-screen/.gitignore
new file mode 100644
index 000000000..5e732742b
--- /dev/null
+++ b/examples/wayland/multi-screen/.gitignore
@@ -0,0 +1 @@
+multi-screen
diff --git a/examples/wayland/multi-screen/doc/src/multi-screen.qdoc b/examples/wayland/multi-screen/doc/src/multi-screen.qdoc
new file mode 100644
index 000000000..20d3912ca
--- /dev/null
+++ b/examples/wayland/multi-screen/doc/src/multi-screen.qdoc
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ * \title Qt Wayland Compositor Examples - Multi Screen
+ * \example multi-screen
+ * \brief Multi Screen is a desktop-style Wayland compositor for multiple screens.
+ * \ingroup qtwaylandcompositor-examples
+ *
+ * Multi-screen is a desktop-style Wayland compositor example for multiple
+ * screens.
+ *
+ * When a client creates a shell surface, one ShellSurfaceItem is created on
+ * each screen. The ShellSurfaceItem will be visible only on one (or two)
+ * screens at a time. ShellSurfaceItem positions are synchronized so that when
+ * windows enter one screen they are moved off another at the same time.
+ *
+ * WaylandQuickItem::setPrimary() is called at appropriate times to set the
+ * primary view for the ShellSurface, which is used when the client asks to be
+ * maximized or fullscreen.
+ */
diff --git a/examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc b/examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc
new file mode 100644
index 000000000..cbb720fae
--- /dev/null
+++ b/examples/wayland/spanning-screens/doc/src/spanning-screens.qdoc
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ * \title Qt Wayland Compositor Examples - Spanning Screens
+ * \example spanning-screens
+ * \brief Spanning Screens is an example that demonstrates how to let Wayland clients span multiple screens.
+ * \ingroup qtwaylandcompositor-examples
+ *
+ * Spanning screens is a Wayland compositor example that maximizes clients
+ * across a top and a bottom screen.
+ */
diff --git a/src/client/configure.json b/src/client/configure.json
index d216960e1..b11416f68 100644
--- a/src/client/configure.json
+++ b/src/client/configure.json
@@ -28,7 +28,8 @@
"test": "wayland_egl",
"sources": [
{ "type": "pkgConfig", "args": "wayland-egl" },
- "-lwayland-egl"
+ "-lwayland-egl",
+ "-lEGL"
]
},
"xcomposite": {
diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp
index dcc4ad5c7..fac5fb840 100644
--- a/src/client/qwaylandinputcontext.cpp
+++ b/src/client/qwaylandinputcontext.cpp
@@ -541,8 +541,10 @@ void QWaylandInputContext::setFocusObject(QObject *)
if (window && window->handle() && inputMethodAccepted()) {
if (mCurrentWindow.data() != window) {
struct ::wl_surface *surface = static_cast<QWaylandWindow *>(window->handle())->object();
- textInput()->enable(surface);
- mCurrentWindow = window;
+ if (surface) {
+ textInput()->enable(surface);
+ mCurrentWindow = window;
+ }
}
textInput()->updateState(Qt::ImQueryAll, QtWayland::zwp_text_input_v2::update_state_enter);
}
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 5bfa158ae..9cc673c0c 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -256,8 +256,10 @@ void QWaylandWindow::reset(bool sendDestroyEvent)
if (isInitialized())
destroy();
- if (mFrameCallback)
+ if (mFrameCallback) {
wl_callback_destroy(mFrameCallback);
+ mFrameCallback = nullptr;
+ }
}
QWaylandWindow *QWaylandWindow::fromWlSurface(::wl_surface *surface)
@@ -725,6 +727,8 @@ QWaylandWindow *QWaylandWindow::transientParent() const
// events.
if (auto transientParent = window()->transientParent())
return static_cast<QWaylandWindow *>(topLevelWindow(transientParent)->handle());
+ else if (QGuiApplication::focusWindow() && (window()->type() == Qt::ToolTip || window()->type() == Qt::Popup))
+ return static_cast<QWaylandWindow *>(topLevelWindow(QGuiApplication::focusWindow())->handle());
return nullptr;
}
diff --git a/src/client/qwaylandxdgshellv6.cpp b/src/client/qwaylandxdgshellv6.cpp
index 947940213..cd81778c7 100644
--- a/src/client/qwaylandxdgshellv6.cpp
+++ b/src/client/qwaylandxdgshellv6.cpp
@@ -163,8 +163,8 @@ void QWaylandXdgSurfaceV6::setAppId(const QString &appId)
void QWaylandXdgSurfaceV6::setType(Qt::WindowType type, QWaylandWindow *transientParent)
{
- if (type == Qt::Popup && transientParent) {
- setPopup(transientParent, m_window->display()->lastInputDevice(), m_window->display()->lastInputSerial());
+ if ((type == Qt::Popup || type == Qt::ToolTip) && transientParent) {
+ setPopup(transientParent, m_window->display()->lastInputDevice(), m_window->display()->lastInputSerial(), type == Qt::Popup);
} else {
setToplevel();
if (transientParent) {
@@ -189,7 +189,7 @@ void QWaylandXdgSurfaceV6::setToplevel()
m_toplevel = new Toplevel(this);
}
-void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial)
+void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial, bool grab)
{
Q_ASSERT(!m_toplevel && !m_popup);
@@ -209,7 +209,9 @@ void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice
m_popup = new Popup(this, parentXdgSurface, positioner);
positioner->destroy();
delete positioner;
- m_popup->grab(device->wl_seat(), serial);
+ if (grab) {
+ m_popup->grab(device->wl_seat(), serial);
+ }
}
void QWaylandXdgSurfaceV6::zxdg_surface_v6_configure(uint32_t serial)
diff --git a/src/client/qwaylandxdgshellv6_p.h b/src/client/qwaylandxdgshellv6_p.h
index 12f7301d5..769f19837 100644
--- a/src/client/qwaylandxdgshellv6_p.h
+++ b/src/client/qwaylandxdgshellv6_p.h
@@ -121,7 +121,7 @@ private:
};
void setToplevel();
- void setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial);
+ void setPopup(QWaylandWindow *parent, QWaylandInputDevice *device, int serial, bool grab);
QWaylandXdgShellV6 *m_shell;
QWaylandWindow *m_window;
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp
index 3f5bbc715..bfd252753 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.cpp
+++ b/src/compositor/compositor_api/qwaylandquickitem.cpp
@@ -742,7 +742,7 @@ void QWaylandQuickItem::handleSubsurfaceAdded(QWaylandSurface *childSurface)
/*!
- \qmlproperty bool QtWaylandCompositor::WaylandQuickItem::subsurfaceHandler
+ \qmlproperty object QtWaylandCompositor::WaylandQuickItem::subsurfaceHandler
This property provides a way to override the default subsurface behavior.
diff --git a/src/compositor/compositor_api/qwaylandseat.h b/src/compositor/compositor_api/qwaylandseat.h
index 5af10a45a..86cf250a6 100644
--- a/src/compositor/compositor_api/qwaylandseat.h
+++ b/src/compositor/compositor_api/qwaylandseat.h
@@ -97,7 +97,6 @@ public:
void sendKeyReleaseEvent(uint code);
void sendFullKeyEvent(QKeyEvent *event);
- void sendFullKeyEvent(QWaylandSurface *surface, QKeyEvent *event);
uint sendTouchPointEvent(QWaylandSurface *surface, int id, const QPointF &point, Qt::TouchPointState state);
void sendTouchFrameEvent(QWaylandClient *client);
diff --git a/src/compositor/configure.json b/src/compositor/configure.json
index 733ccfc03..a95c4eb01 100644
--- a/src/compositor/configure.json
+++ b/src/compositor/configure.json
@@ -18,7 +18,8 @@
"test": "wayland_egl",
"sources": [
{ "type": "pkgConfig", "args": "wayland-egl" },
- "-lwayland-egl"
+ "-lwayland-egl",
+ "-lEGL"
]
},
"xcomposite": {
diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp b/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp
index e468220f9..bc23131be 100644
--- a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp
+++ b/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp
@@ -47,6 +47,7 @@ QT_BEGIN_NAMESPACE
/*!
* \qmltype ShellSurfaceItem
+ * \inherits WaylandQuickItem
* \inqmlmodule QtWayland.Compositor
* \since 5.8
* \brief A Qt Quick item type representing a WlShellSurface.
@@ -133,9 +134,19 @@ void QWaylandQuickShellSurfaceItem::setShellSurface(QWaylandShellSurface *shellS
}
/*!
+ * \qmlproperty Item QtWaylandCompositor::ShellSurfaceItem::moveItem
+ *
+ * This property holds the move item for this ShellSurfaceItem. This is the item that will be moved
+ * when the clients request the ShellSurface to be moved, maximized, resized etc. This property is
+ * useful when implementing server-side decorations.
+ */
+
+/*!
* \property QWaylandQuickShellSurfaceItem::moveItem
*
- * This property holds the move item for this QWaylandQuickShellSurfaceItem.
+ * This property holds the move item for this QWaylandQuickShellSurfaceItem. This is the item that
+ * will be moved when the clients request the QWaylandShellSurface to be moved, maximized, resized
+ * etc. This property is useful when implementing server-side decorations.
*/
QQuickItem *QWaylandQuickShellSurfaceItem::moveItem() const
{