summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dist/changes-5.9.533
-rw-r--r--dist/changes-5.9.630
-rw-r--r--qtwayland.pro2
-rw-r--r--src/client/qwaylanddataoffer.cpp2
-rw-r--r--src/client/qwaylanddataoffer_p.h2
-rw-r--r--src/client/qwaylandintegration.cpp11
-rw-r--r--src/client/qwaylandwindow.cpp13
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp8
-rw-r--r--src/compositor/compositor_api/qwaylandview.cpp9
-rw-r--r--tests/auto/client/client/tst_client.cpp12
10 files changed, 113 insertions, 9 deletions
diff --git a/dist/changes-5.9.5 b/dist/changes-5.9.5
new file mode 100644
index 000000000..403b1dca6
--- /dev/null
+++ b/dist/changes-5.9.5
@@ -0,0 +1,33 @@
+Qt 5.9.5 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 QPA Plugin 5.9.5 Changes *
+****************************************************************************
+
+ - [QTBUG-66687] Fixed a crash that happened sometimes when a window was shown.
+ - [QTBUG-66867] Fixed a crash when a hidden window was destroyed (EGL).
+
+****************************************************************************
+* Qt Wayland Compositor API 5.9.5 Changes *
+****************************************************************************
+
+ - Minor documentation improvements.
diff --git a/dist/changes-5.9.6 b/dist/changes-5.9.6
new file mode 100644
index 000000000..0ce68e7e1
--- /dev/null
+++ b/dist/changes-5.9.6
@@ -0,0 +1,30 @@
+Qt 5.9.6 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 5.9.0 through 5.9.5.
+
+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.
+
+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.9.6 Changes *
+****************************************************************************
+
+QPA plugin
+----------
+
+ - [QTBUG-63411] Fixed a crash when calling setVisible for EGL windows twice
+ within one slot.
+ - [QTBUG-67150] Fixed a crash when a popup was shown without any input
+ events happening first.
diff --git a/qtwayland.pro b/qtwayland.pro
index 04eca333b..fdcc3e24f 100644
--- a/qtwayland.pro
+++ b/qtwayland.pro
@@ -1,3 +1,3 @@
-requires(linux:!android)
+requires(linux:!android|macos)
requires(qtHaveModule(gui))
load(qt_parts)
diff --git a/src/client/qwaylanddataoffer.cpp b/src/client/qwaylanddataoffer.cpp
index 35085a7f0..0c732c020 100644
--- a/src/client/qwaylanddataoffer.cpp
+++ b/src/client/qwaylanddataoffer.cpp
@@ -135,7 +135,7 @@ QVariant QWaylandMimeData::retrieveData_sys(const QString &mimeType, QVariant::T
}
int pipefd[2];
- if (::pipe2(pipefd, O_CLOEXEC|O_NONBLOCK) == -1) {
+ if (qt_safe_pipe(pipefd, O_NONBLOCK) == -1) {
qWarning("QWaylandMimeData: pipe2() failed");
return QVariant();
}
diff --git a/src/client/qwaylanddataoffer_p.h b/src/client/qwaylanddataoffer_p.h
index 3e88b8f4b..5412400a5 100644
--- a/src/client/qwaylanddataoffer_p.h
+++ b/src/client/qwaylanddataoffer_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <QtGui/private/qdnd_p.h>
+#include <QtGui/private/qinternalmimedata_p.h>
#include <QtWaylandClient/private/qtwaylandclientglobal_p.h>
#include <QtWaylandClient/private/qwayland-wayland.h>
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index a3ae802ff..e935ef31f 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -52,7 +52,12 @@
#include "qwaylandwindowmanagerintegration_p.h"
#include "qwaylandscreen_p.h"
-#include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
+#if defined(Q_OS_MACOS)
+# include <QtFontDatabaseSupport/private/qcoretextfontdatabase_p.h>
+# include <QtFontDatabaseSupport/private/qfontengine_coretext_p.h>
+#else
+# include <QtFontDatabaseSupport/private/qgenericunixfontdatabase_p.h>
+#endif
#include <QtEventDispatcherSupport/private/qgenericunixeventdispatcher_p.h>
#include <QtThemeSupport/private/qgenericunixthemes_p.h>
@@ -118,7 +123,11 @@ public:
};
QWaylandIntegration::QWaylandIntegration()
+#if defined(Q_OS_MACOS)
+ : mFontDb(new QCoreTextFontDatabaseEngineFactory<QCoreTextFontEngine>)
+#else
: mFontDb(new QGenericUnixFontDatabase())
+#endif
, mNativeInterface(new QWaylandNativeInterface(this))
#if QT_CONFIG(accessibility)
, mAccessibility(new QPlatformAccessibility())
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index ef49e8ea8..e07133063 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -282,7 +282,18 @@ void QWaylandWindow::setWindowTitle(const QString &title)
{
if (mShellSurface) {
const QString separator = QString::fromUtf8(" \xe2\x80\x94 "); // unicode character U+2014, EM DASH
- mShellSurface->setTitle(formatWindowTitle(title, separator));
+ const QString formatted = formatWindowTitle(title, separator);
+
+ const int libwaylandMaxBufferSize = 4096;
+ // Some parts of the buffer is used for metadata, so subtract 100 to be on the safe side
+ const int maxLength = libwaylandMaxBufferSize - 100;
+
+ auto truncated = QStringRef(&formatted).left(maxLength);
+ if (truncated.length() < formatted.length()) {
+ qCWarning(lcQpaWayland) << "Window titles longer than" << maxLength << "characters are not supported."
+ << "Truncating window title (from" << formatted.length() << "chars)";
+ }
+ mShellSurface->setTitle(truncated.toString());
}
if (mWindowDecoration && window()->isVisible())
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp
index f3e0ffa78..b3e370f45 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.cpp
+++ b/src/compositor/compositor_api/qwaylandquickitem.cpp
@@ -1351,8 +1351,12 @@ void QWaylandQuickItem::handleDragStarted(QWaylandDrag *drag)
qreal QWaylandQuickItemPrivate::scaleFactor() const
{
- return (view->output() ? view->output()->scaleFactor() : 1)
- / (window ? window->devicePixelRatio() : 1);
+ qreal f = view->output() ? view->output()->scaleFactor() : 1;
+#if !defined(Q_OS_MACOS)
+ if (window)
+ f /= window->devicePixelRatio();
+#endif
+ return f;
}
QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandview.cpp b/src/compositor/compositor_api/qwaylandview.cpp
index 4d6f392e1..477b45897 100644
--- a/src/compositor/compositor_api/qwaylandview.cpp
+++ b/src/compositor/compositor_api/qwaylandview.cpp
@@ -350,12 +350,17 @@ void QWaylandView::setAllowDiscardFrontBuffer(bool discard)
/*!
* Makes this QWaylandView the primary view for the surface.
*
+ * It has no effect if this QWaylandView is not holding any QWaylandSurface
+ *
* \sa QWaylandSurface::primaryView
*/
void QWaylandView::setPrimary()
{
Q_D(QWaylandView);
- d->surface->setPrimaryView(this);
+ if (d->surface)
+ d->surface->setPrimaryView(this);
+ else
+ qWarning("Calling setPrimary() on a QWaylandView without a surface has no effect.");
}
/*!
@@ -366,7 +371,7 @@ void QWaylandView::setPrimary()
bool QWaylandView::isPrimary() const
{
Q_D(const QWaylandView);
- return d->surface->primaryView() == this;
+ return d->surface && d->surface->primaryView() == this;
}
/*!
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp
index 21f748ecd..6b7daecd5 100644
--- a/tests/auto/client/client/tst_client.cpp
+++ b/tests/auto/client/client/tst_client.cpp
@@ -162,6 +162,7 @@ public slots:
// make sure the surfaces from the last test are properly cleaned up
// and don't show up as false positives in the next test
QTRY_VERIFY(!compositor->surface());
+ QTRY_VERIFY(!compositor->iviSurface());
QTRY_VERIFY(!compositor->xdgToplevelV6());
}
@@ -181,6 +182,7 @@ private slots:
void hiddenTransientParent();
void hiddenPopupParent();
void glWindow();
+ void longWindowTitle();
private:
MockCompositor *compositor = nullptr;
@@ -597,6 +599,16 @@ void tst_WaylandClient::glWindow()
QTRY_VERIFY(!compositor->surface());
}
+void tst_WaylandClient::longWindowTitle()
+{
+ // See QTBUG-68715
+ QWindow window;
+ QString absurdlyLongTitle(10000, QLatin1Char('z'));
+ window.setTitle(absurdlyLongTitle);
+ window.show();
+ QTRY_VERIFY(compositor->surface());
+}
+
int main(int argc, char **argv)
{
setenv("XDG_RUNTIME_DIR", ".", 1);