summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-06-19 13:18:03 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-06-19 13:18:04 +0200
commit9487f226cc6eba557ededf1d138de510cb2763e1 (patch)
tree760bc881aeed8f885038c5cfab517ade93d31d62
parent213429db416b60c6013624615206a6bf4c059d3f (diff)
parent3ffa7d5d6ecb75c244c6b22565df5184c638643a (diff)
Merge remote-tracking branch 'origin/5.11.1' into 5.11
-rw-r--r--dist/changes-5.11.143
-rw-r--r--src/client/qwaylandxdgshellv6.cpp33
-rw-r--r--src/client/qwaylandxdgshellv6_p.h8
-rw-r--r--tests/auto/client/client/tst_client.cpp1
4 files changed, 80 insertions, 5 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/src/client/qwaylandxdgshellv6.cpp b/src/client/qwaylandxdgshellv6.cpp
index a166a3bc9..5bcd3b254 100644
--- a/src/client/qwaylandxdgshellv6.cpp
+++ b/src/client/qwaylandxdgshellv6.cpp
@@ -93,6 +93,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)
{
}
@@ -100,6 +101,12 @@ 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::applyConfigure()
@@ -107,6 +114,13 @@ void QWaylandXdgSurfaceV6::Popup::applyConfigure()
}
+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()
{
m_xdgSurface->m_window->window()->close();
@@ -124,8 +138,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();
}
@@ -198,6 +214,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
@@ -213,9 +237,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/client/qwaylandxdgshellv6_p.h b/src/client/qwaylandxdgshellv6_p.h
index b72d3d18a..e6434c02f 100644
--- a/src/client/qwaylandxdgshellv6_p.h
+++ b/src/client/qwaylandxdgshellv6_p.h
@@ -115,9 +115,12 @@ private:
~Popup() override;
void applyConfigure();
+ 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();
@@ -129,6 +132,8 @@ private:
Popup *m_popup = nullptr;
bool m_configured = false;
QRegion m_exposeRegion;
+
+ friend class QWaylandXdgShellV6;
};
class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShellV6 : public QtWayland::zxdg_shell_v6
@@ -142,6 +147,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/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp
index dcc0cb773..874de82cc 100644
--- a/tests/auto/client/client/tst_client.cpp
+++ b/tests/auto/client/client/tst_client.cpp
@@ -490,6 +490,7 @@ void tst_WaylandClient::mouseDrag()
void tst_WaylandClient::dontCrashOnMultipleCommits()
{
+ QSKIP("This test is flaky. See QTBUG-68756.");
auto window = new TestWindow();
window->show();