summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-06-28 18:24:20 +0200
committerLiang Qi <liang.qi@qt.io>2018-06-28 20:56:59 +0200
commitefbeace6ffa14de0f7a1ec8b8b9653056612d5f8 (patch)
treeeb2b2fccc7aa1422ed7be48e97c6fa90b057680a
parent4d9e127d3c3171bd796c5d6fc7c1c2f70101ad34 (diff)
parent56e01f9e3372446d20f0bb70bed0b88348f2a74b (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: src/client/qwaylandxdgsurface.cpp src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h Done-with: Johan Klokkhammer Helsing <johan.helsing@qt.io> Change-Id: Ia39be6254a95af1c4efa831358cc06a697da3423
-rw-r--r--dist/changes-5.11.143
-rw-r--r--examples/wayland/overview-compositor/doc/src/overview-compositor.qdoc3
-rw-r--r--src/compositor/compositor_api/qwaylandbufferref.cpp2
-rw-r--r--src/compositor/compositor_api/qwaylandquickhardwarelayer.cpp2
-rw-r--r--src/compositor/compositor_api/qwaylandsurfacegrabber.cpp2
-rw-r--r--src/compositor/extensions/extensions.pri3
-rw-r--r--src/compositor/extensions/qwaylandshellsurface.cpp4
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5.cpp2
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6.cpp8
-rw-r--r--src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp1
-rw-r--r--src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp33
-rw-r--r--src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h8
-rw-r--r--sync.profile47
-rw-r--r--tests/auto/client/client/tst_client.cpp1
14 files changed, 143 insertions, 16 deletions
diff --git a/dist/changes-5.11.1 b/dist/changes-5.11.1
new file mode 100644
index 000000000..ee35e7b45
--- /dev/null
+++ b/dist/changes-5.11.1
@@ -0,0 +1,43 @@
+Qt 5.11.1 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.11.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.11 series is binary compatible with the 5.10.x series.
+Applications compiled for 5.10 will continue to run with 5.11.
+
+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 5.11.1 Changes *
+****************************************************************************
+
+****************************************************************************
+* QPA Plugin *
+****************************************************************************
+
+ - [QTBUG-67988] Fixed a protocol error that sometimes happened when
+ showing popups such as nested menus on xdg-shell unstable v6.
+
+ - [QTBUG-68715] Fixed bug where setting absurdly long window titles
+ would terminate the application.
+
+****************************************************************************
+* Qt Wayland Compositor *
+****************************************************************************
+
+ - Fixed crash when calling QWaylandView::setPrimary/isPrimary without
+ a surface
+
+ - Fixed bug where custom extensions could be initialized multiple times.
+
+ - Fixed OpenGL texture leak when running multi-threaded.
diff --git a/examples/wayland/overview-compositor/doc/src/overview-compositor.qdoc b/examples/wayland/overview-compositor/doc/src/overview-compositor.qdoc
index c34eeb2a7..50408bc56 100644
--- a/examples/wayland/overview-compositor/doc/src/overview-compositor.qdoc
+++ b/examples/wayland/overview-compositor/doc/src/overview-compositor.qdoc
@@ -28,6 +28,7 @@
/*!
* \title Qt Wayland Compositor Examples - Overview Compositor
* \example overview-compositor
- * \brief Overview Compositor shows how to switch between clients in a grid
+ * \brief Overview Compositor shows how to switch between clients in a grid.
+ *
* \ingroup qtwaylandcompositor-examples
*/
diff --git a/src/compositor/compositor_api/qwaylandbufferref.cpp b/src/compositor/compositor_api/qwaylandbufferref.cpp
index 82997a5d3..ab34d1253 100644
--- a/src/compositor/compositor_api/qwaylandbufferref.cpp
+++ b/src/compositor/compositor_api/qwaylandbufferref.cpp
@@ -59,7 +59,7 @@ public:
* \class QWaylandBufferRef
* \inmodule QtWaylandCompositor
* \since 5.8
- * \brief The QWaylandBufferRef class holds the reference to a surface buffer
+ * \brief The QWaylandBufferRef class holds the reference to a surface buffer.
*
* This class can be used to reference a surface buffer. As long as a reference
* to the buffer exists, it is owned by the compositor and the client cannot modify it.
diff --git a/src/compositor/compositor_api/qwaylandquickhardwarelayer.cpp b/src/compositor/compositor_api/qwaylandquickhardwarelayer.cpp
index f82de0014..11dd7b47d 100644
--- a/src/compositor/compositor_api/qwaylandquickhardwarelayer.cpp
+++ b/src/compositor/compositor_api/qwaylandquickhardwarelayer.cpp
@@ -87,7 +87,7 @@ QtWayland::HardwareLayerIntegration *QWaylandQuickHardwareLayerPrivate::layerInt
* \qmltype WaylandHardwareLayer
* \inqmlmodule QtWayland.Compositor
* \preliminary
- * \brief Makes a parent WaylandQuickItem use hardware layers for rendering
+ * \brief Makes a parent WaylandQuickItem use hardware layers for rendering.
*
* This item needs to be a descendant of a WaylandQuickItem or a derivative,
* (i.e. ShellSurfaceItem or similar)
diff --git a/src/compositor/compositor_api/qwaylandsurfacegrabber.cpp b/src/compositor/compositor_api/qwaylandsurfacegrabber.cpp
index 5db576221..d36efb543 100644
--- a/src/compositor/compositor_api/qwaylandsurfacegrabber.cpp
+++ b/src/compositor/compositor_api/qwaylandsurfacegrabber.cpp
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
\class QWaylandSurfaceGrabber
\inmodule QtWaylandCompositor
\since 5.8
- \brief The QWaylandSurfaceGrabber class allows to read the content of a QWaylandSurface
+ \brief The QWaylandSurfaceGrabber class allows to read the content of a QWaylandSurface.
Sometimes it is needed to get the contents of a surface, for example to provide a screenshot
to the user. The QWaylandSurfaceGrabber class provides a simple method to do so, without
diff --git a/src/compositor/extensions/extensions.pri b/src/compositor/extensions/extensions.pri
index 77c09aa23..d51a75b5d 100644
--- a/src/compositor/extensions/extensions.pri
+++ b/src/compositor/extensions/extensions.pri
@@ -1,6 +1,9 @@
CONFIG += wayland-scanner
CONFIG += generated_privates
+# make sure we install the headers generated by wayland-scanner
+private_headers.CONFIG += no_check_exist
+
WAYLANDSERVERSOURCES += \
../extensions/touch-extension.xml \
../extensions/qt-key-unstable-v1.xml \
diff --git a/src/compositor/extensions/qwaylandshellsurface.cpp b/src/compositor/extensions/qwaylandshellsurface.cpp
index c1cd5272e..3cfe44895 100644
--- a/src/compositor/extensions/qwaylandshellsurface.cpp
+++ b/src/compositor/extensions/qwaylandshellsurface.cpp
@@ -43,7 +43,7 @@
* \qmltype ShellSurface
* \inqmlmodule QtWayland.Compositor
* \since 5.8
- * \brief Provides a common interface for surface roles specified by shell extensions
+ * \brief Provides a common interface for surface roles specified by shell extensions.
*
* This interface represents a Wayland surface role given by a Wayland protocol extension that
* defines how the WaylandSurface should map onto the screen.
@@ -61,7 +61,7 @@
* \class QWaylandShellSurface
* \inmodule QtWaylandCompositor
* \since 5.8
- * \brief The QWaylandShellSurface class is a common interface for surface roles specified by shell extensions
+ * \brief The QWaylandShellSurface class is a common interface for surface roles specified by shell extensions.
*
* This interface represents a Wayland surface role given by a Wayland protocol extension that
* defines how the QWaylandSurface should map onto the screen.
diff --git a/src/compositor/extensions/qwaylandxdgshellv5.cpp b/src/compositor/extensions/qwaylandxdgshellv5.cpp
index cbcd50ae4..6bfaf7a61 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv5.cpp
@@ -1324,7 +1324,7 @@ QWaylandQuickShellIntegration *QWaylandXdgSurfaceV5::createIntegration(QWaylandQ
* \class QWaylandXdgPopupV5
* \inmodule QtWaylandCompositor
* \since 5.8
- * \brief The QWaylandXdgPopupV5 class provides menus for an xdg surface
+ * \brief The QWaylandXdgPopupV5 class provides menus for an xdg surface.
*
* This class is part of the QWaylandXdgShellV5 extension and provides a way to
* extend the functionality of an existing QWaylandSurface with features
diff --git a/src/compositor/extensions/qwaylandxdgshellv6.cpp b/src/compositor/extensions/qwaylandxdgshellv6.cpp
index 342edfd14..8cde4668e 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv6.cpp
@@ -704,7 +704,7 @@ QWaylandQuickShellIntegration *QWaylandXdgSurfaceV6::createIntegration(QWaylandQ
* \qmltype XdgToplevelV6
* \inqmlmodule QtWayland.Compositor
* \since 5.10
- * \brief XdgToplevelV6 represents the toplevel window specific parts of an xdg surface
+ * \brief XdgToplevelV6 represents the toplevel window specific parts of an xdg surface.
*
* This type is part of the \l{XdgShellV6} extension and provides a way to
* extend the functionality of an XdgSurfaceV6 with features
@@ -717,7 +717,7 @@ QWaylandQuickShellIntegration *QWaylandXdgSurfaceV6::createIntegration(QWaylandQ
* \class QWaylandXdgToplevelV6
* \inmodule QtWaylandCompositor
* \since 5.10
- * \brief The QWaylandXdgToplevelV6 class represents the toplevel window specific parts of an xdg surface
+ * \brief The QWaylandXdgToplevelV6 class represents the toplevel window specific parts of an xdg surface.
*
* This class is part of the QWaylandXdgShellV6 extension and provides a way to
* extend the functionality of an QWaylandXdgSurfaceV6 with features
@@ -1462,7 +1462,7 @@ void QWaylandXdgToplevelV6Private::zxdg_toplevel_v6_set_minimized(QtWaylandServe
* \qmltype XdgPopupV6
* \inqmlmodule QtWayland.Compositor
* \since 5.10
- * \brief XdgPopupV6 represents the popup specific parts of and xdg surface
+ * \brief XdgPopupV6 represents the popup specific parts of and xdg surface.
*
* This type is part of the \l{XdgShellV6} extension and provides a way to extend
* extend the functionality of an \l{XdgSurfaceV6} with features
@@ -1475,7 +1475,7 @@ void QWaylandXdgToplevelV6Private::zxdg_toplevel_v6_set_minimized(QtWaylandServe
* \class QWaylandXdgPopupV6
* \inmodule QtWaylandCompositor
* \since 5.10
- * \brief The QWaylandXdgPopupV6 class represents the popup specific parts of an xdg surface
+ * \brief The QWaylandXdgPopupV6 class represents the popup specific parts of an xdg surface.
*
* This class is part of the QWaylandXdgShellV6 extension and provides a way to
* extend the functionality of a QWaylandXdgSurfaceV6 with features
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp
index 31c7dff7b..40e2a994d 100644
--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp
+++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp
@@ -229,6 +229,7 @@ void QWaylandXdgSurfaceV5::xdg_surface_configure(int32_t width, int32_t height,
void QWaylandXdgSurfaceV5::xdg_surface_close()
{
+ m_window->window()->close();
}
}
diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
index a8bfaac69..986deceb1 100644
--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
+++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
@@ -152,6 +152,7 @@ QWaylandXdgSurfaceV6::Popup::Popup(QWaylandXdgSurfaceV6 *xdgSurface, QWaylandXdg
QtWayland::zxdg_positioner_v6 *positioner)
: zxdg_popup_v6(xdgSurface->get_popup(parent->object(), positioner->object()))
, m_xdgSurface(xdgSurface)
+ , m_parent(parent)
{
}
@@ -159,6 +160,19 @@ QWaylandXdgSurfaceV6::Popup::~Popup()
{
if (isInitialized())
destroy();
+
+ if (m_grabbing) {
+ auto *shell = m_xdgSurface->m_shell;
+ Q_ASSERT(shell->m_topmostPopup == this);
+ shell->m_topmostPopup = m_parent->m_popup;
+ }
+}
+
+void QWaylandXdgSurfaceV6::Popup::grab(QWaylandInputDevice *seat, uint serial)
+{
+ m_xdgSurface->m_shell->m_topmostPopup = this;
+ zxdg_popup_v6::grab(seat->wl_seat(), serial);
+ m_grabbing = true;
}
void QWaylandXdgSurfaceV6::Popup::zxdg_popup_v6_popup_done()
@@ -192,8 +206,10 @@ QWaylandXdgSurfaceV6::~QWaylandXdgSurfaceV6()
{
if (m_toplevel)
zxdg_toplevel_v6_destroy(m_toplevel->object());
- if (m_popup)
- zxdg_popup_v6_destroy(m_popup->object());
+ if (m_popup) {
+ delete m_popup;
+ m_popup = nullptr;
+ }
destroy();
}
@@ -277,6 +293,14 @@ void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice
Q_ASSERT(!m_toplevel && !m_popup);
auto parentXdgSurface = static_cast<QWaylandXdgSurfaceV6 *>(parent->shellSurface());
+
+ auto *top = m_shell->m_topmostPopup;
+ if (grab && top && top->m_xdgSurface != parentXdgSurface) {
+ qCWarning(lcQpaWayland) << "setPopup called for a surface that was not the topmost popup, positions might be off.";
+ parentXdgSurface = top->m_xdgSurface;
+ parent = top->m_xdgSurface->m_window;
+ }
+
auto positioner = new QtWayland::zxdg_positioner_v6(m_shell->create_positioner());
// set_popup expects a position relative to the parent
QPoint transientPos = m_window->geometry().topLeft(); // this is absolute
@@ -292,9 +316,8 @@ void QWaylandXdgSurfaceV6::setPopup(QWaylandWindow *parent, QWaylandInputDevice
m_popup = new Popup(this, parentXdgSurface, positioner);
positioner->destroy();
delete positioner;
- if (grab) {
- m_popup->grab(device->wl_seat(), serial);
- }
+ if (grab)
+ m_popup->grab(device, serial);
}
void QWaylandXdgSurfaceV6::zxdg_surface_v6_configure(uint32_t serial)
diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
index 8168ae565..38b711f88 100644
--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
+++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
@@ -122,9 +122,12 @@ private:
Popup(QWaylandXdgSurfaceV6 *xdgSurface, QWaylandXdgSurfaceV6 *parent, QtWayland::zxdg_positioner_v6 *positioner);
~Popup() override;
+ void grab(QWaylandInputDevice *seat, uint serial);
void zxdg_popup_v6_popup_done() override;
QWaylandXdgSurfaceV6 *m_xdgSurface = nullptr;
+ QWaylandXdgSurfaceV6 *m_parent = nullptr;
+ bool m_grabbing = false;
};
void setToplevel();
@@ -137,6 +140,8 @@ private:
bool m_configured = false;
QRegion m_exposeRegion;
uint m_pendingConfigureSerial = 0;
+
+ friend class QWaylandXdgShellV6;
};
class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShellV6 : public QtWayland::zxdg_shell_v6
@@ -150,6 +155,9 @@ public:
private:
void zxdg_shell_v6_ping(uint32_t serial) override;
+ QWaylandXdgSurfaceV6::Popup *m_topmostPopup = nullptr;
+
+ friend class QWaylandXdgSurfaceV6;
};
QT_END_NAMESPACE
diff --git a/sync.profile b/sync.profile
index 458ee9f23..a2da7dbc4 100644
--- a/sync.profile
+++ b/sync.profile
@@ -17,3 +17,50 @@
%classnames = (
"qwaylandquickextension.h" => "QWaylandQuickExtension",
);
+%inject_headers = (
+ "$basedir/src/client" => [
+ "^qwayland-hardware-integration.h",
+ "^qwayland-qt-windowmanager.h",
+ "^qwayland-qtkey-extension.h" ,
+ "^qwayland-server-buffer-extension.h",
+ "^qwayland-surface-extension.h",
+ "^qwayland-text-input-unstable-v2.h",
+ "^qwayland-touch-extension.h",
+ "^qwayland-wayland.h",
+ "^qwayland-xdg-shell-unstable-v6.h",
+ "^qwayland-xdg-shell.h",
+ "^wayland-hardware-integration-client-protocol.h",
+ "^wayland-qt-windowmanager-client-protocol.h",
+ "^wayland-qtkey-extension-client-protocol.h",
+ "^wayland-server-buffer-extension-client-protocol.h",
+ "^wayland-surface-extension-client-protocol.h",
+ "^wayland-text-input-unstable-v2-client-protocol.h",
+ "^wayland-touch-extension-client-protocol.h",
+ "^wayland-wayland-client-protocol.h",
+ "^wayland-xdg-shell-client-protocol.h",
+ "^wayland-xdg-shell-unstable-v6-client-protocol.h",
+ ],
+ "$basedir/src/compositor" => [
+ "^qwayland-server-wayland.h",
+ "^qwayland-server-hardware-integration.h",
+ "^qwayland-server-ivi-application.h",
+ "^qwayland-server-qt-windowmanager.h",
+ "^qwayland-server-qtkey-extension.h",
+ "^qwayland-server-server-buffer-extension.h",
+ "^qwayland-server-text-input-unstable-v2.h",
+ "^qwayland-server-touch-extension.h",
+ "^qwayland-server-xdg-shell-unstable-v6.h",
+ "^qwayland-server-xdg-shell.h",
+ "^wayland-hardware-integration-server-protocol.h",
+ "^wayland-ivi-application-server-protocol.h",
+ "^wayland-qt-windowmanager-server-protocol.h",
+ "^wayland-qtkey-extension-server-protocol.h",
+ "^wayland-server-buffer-extension-server-protocol.h",
+ "^wayland-text-input-unstable-v2-server-protocol.h",
+ "^wayland-touch-extension-server-protocol.h",
+ "^wayland-wayland-server-protocol.h",
+ "^wayland-xdg-shell-server-protocol.h",
+ "^wayland-xdg-shell-unstable-v6-server-protocol.h",
+ ],
+);
+@private_headers = ( qr/^qwayland-.*\.h/, qr/^wayland-.*-protocol\.h/ );
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp
index 6b7daecd5..470db25a4 100644
--- a/tests/auto/client/client/tst_client.cpp
+++ b/tests/auto/client/client/tst_client.cpp
@@ -506,6 +506,7 @@ void tst_WaylandClient::mouseDrag()
void tst_WaylandClient::dontCrashOnMultipleCommits()
{
+ QSKIP("This test is flaky. See QTBUG-68756.");
auto window = new TestWindow();
window->show();