Accepting request 729225 from KDE:Qt:5.13

Qt 5.13.1

OBS-URL: https://build.opensuse.org/request/show/729225
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtwayland?expand=0&rev=30
This commit is contained in:
Dominique Leuenberger 2019-09-09 10:31:05 +00:00 committed by Git OBS Bridge
commit 48be421b65
8 changed files with 20 additions and 261 deletions

View File

@ -1,36 +0,0 @@
From 4eb9a5a70506cf76fbe954c56b39857f8a3be0eb Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Wed, 12 Jun 2019 16:03:13 +0200
Subject: [PATCH 1/5] Don't crash if we start a drag without dragFocus
Sometimes origin will be nullptr, triggering a crash.
[ChangeLog][QPA plugin] Fixed a crash that sometimes happened when
starting a drag-and-drop operation.
Fixes: QTBUG-76368
Change-Id: I8f4e6b05f073644834c3c72a8307dac5b897f626
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
---
src/client/qwaylanddatadevice.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp
index 300c9de0..11984f9d 100644
--- a/src/client/qwaylanddatadevice.cpp
+++ b/src/client/qwaylanddatadevice.cpp
@@ -111,7 +111,10 @@ void QWaylandDataDevice::startDrag(QMimeData *mimeData, QWaylandWindow *icon)
if (!origin)
origin = m_display->currentInputDevice()->touchFocus();
- start_drag(m_dragSource->object(), origin->object(), icon->object(), m_display->currentInputDevice()->serial());
+ if (origin)
+ start_drag(m_dragSource->object(), origin->object(), icon->object(), m_display->currentInputDevice()->serial());
+ else
+ qCDebug(lcQpaWayland) << "Couldn't start a drag because the origin window could not be found.";
}
void QWaylandDataDevice::cancelDrag()
--
2.22.0

View File

@ -1,36 +0,0 @@
From ce8fd1f97984476b3638569e7a7f0ab379d891ae Mon Sep 17 00:00:00 2001
From: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Date: Wed, 24 Jul 2019 23:40:55 +0200
Subject: [PATCH] Fix use of private dependency
With 0761173a, Linux SPI Accessibility bridge was added to
the Wayland QPA plugin, but this had a bad side-effect to
QtWaylandClient.
Linux Accessibility support is a private module, this means we have
to link to it with QT_PRIVATE not QT, otherwise CMake and pkg-config
files for Qt5WaylandClient will depend on it.
Change-Id: I6182267f97adc2cd5bd66895df148a6a45614f45
Fixes: QTBUG-76042
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
---
src/client/client.pro | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/client/client.pro b/src/client/client.pro
index db91bd69..4233ac95 100644
--- a/src/client/client.pro
+++ b/src/client/client.pro
@@ -20,7 +20,7 @@ qtConfig(xkbcommon) {
}
qtHaveModule(linuxaccessibility_support_private): \
- QT += linuxaccessibility_support_private
+ QT_PRIVATE += linuxaccessibility_support_private
QMAKE_USE += wayland-client
--
2.22.0

View File

@ -1,134 +0,0 @@
From 8e72a9b2f6b4a7af3f16ceb4216a8cc3c6768b8a Mon Sep 17 00:00:00 2001
From: Johan Klokkhammer Helsing <johan.helsing@qt.io>
Date: Wed, 19 Jun 2019 14:05:22 +0200
Subject: [PATCH 2/5] Client: Fix stuttering when the GUI thread is busy
When we did invokeMethod for handling the frame callbacks, we had to wait for
the GUI thread to finish whatever it's doing before we would stop blocking.
Fix it by clearing the frame callback timer and stop blocking immediately,
while delaying the rest of the work until it can be run on the other thread.
Fixes: QTBUG-76397
Change-Id: I343e4feac4838926b4fa2ccac2948988bc6c3bb7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
---
src/client/qwaylandwindow.cpp | 59 ++++++++++++++++++-----------------
src/client/qwaylandwindow_p.h | 2 +-
2 files changed, 32 insertions(+), 29 deletions(-)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 8b2c1227..7fca9783 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -614,29 +614,34 @@ const wl_callback_listener QWaylandWindow::callbackListener = {
Q_UNUSED(callback);
Q_UNUSED(time);
auto *window = static_cast<QWaylandWindow*>(data);
- if (window->thread() != QThread::currentThread())
- QMetaObject::invokeMethod(window, [=] { window->handleFrameCallback(); }, Qt::QueuedConnection);
- else
- window->handleFrameCallback();
+ window->handleFrameCallback();
}
};
void QWaylandWindow::handleFrameCallback()
{
- bool wasExposed = isExposed();
+ // Stop the timer and stop waiting immediately
+ int timerId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1);
+ mWaitingForFrameCallback = false;
- if (mFrameCallbackTimerId != -1) {
- killTimer(mFrameCallbackTimerId);
- mFrameCallbackTimerId = -1;
- }
+ // The rest can wait until we can run it on the correct thread
+ auto doHandleExpose = [this, timerId]() {
+ if (timerId != -1)
+ killTimer(timerId);
- mWaitingForFrameCallback = false;
- mFrameCallbackTimedOut = false;
+ bool wasExposed = isExposed();
+ mFrameCallbackTimedOut = false;
+ if (!wasExposed && isExposed()) // Did setting mFrameCallbackTimedOut make the window exposed?
+ sendExposeEvent(QRect(QPoint(), geometry().size()));
+ if (wasExposed && hasPendingUpdateRequest())
+ deliverUpdateRequest();
+ };
- if (!wasExposed && isExposed())
- sendExposeEvent(QRect(QPoint(), geometry().size()));
- if (wasExposed && hasPendingUpdateRequest())
- deliverUpdateRequest();
+ if (thread() != QThread::currentThread()) {
+ QMetaObject::invokeMethod(this, doHandleExpose);
+ } else {
+ doHandleExpose();
+ }
}
QMutex QWaylandWindow::mFrameSyncMutex;
@@ -658,11 +663,11 @@ bool QWaylandWindow::waitForFrameSync(int timeout)
}
// Stop current frame timer if any, can't use killTimer directly, because we might be on a diffent thread
- if (mFrameCallbackTimerId != -1) {
- int id = mFrameCallbackTimerId;
- mFrameCallbackTimerId = -1;
- QMetaObject::invokeMethod(this, [=] { killTimer(id); }, Qt::QueuedConnection);
- }
+ // Ordered semantics is needed to avoid stopping the timer twice and not miss it when it's
+ // started by other writes
+ int fcbId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1);
+ if (fcbId != -1)
+ QMetaObject::invokeMethod(this, [=] { killTimer(fcbId); }, Qt::QueuedConnection);
return !mWaitingForFrameCallback;
}
@@ -1100,9 +1105,9 @@ void QWaylandWindow::timerEvent(QTimerEvent *event)
}
}
- if (event->timerId() == mFrameCallbackTimerId) {
- killTimer(mFrameCallbackTimerId);
- mFrameCallbackTimerId = -1;
+
+ if (mFrameCallbackTimerId.testAndSetOrdered(event->timerId(), -1)) {
+ killTimer(event->timerId());
qCDebug(lcWaylandBackingstore) << "Didn't receive frame callback in time, window should now be inexposed";
mFrameCallbackTimedOut = true;
mWaitingForUpdate = false;
@@ -1164,11 +1169,9 @@ void QWaylandWindow::handleUpdate()
mWaitingForUpdate = false;
// Stop current frame timer if any, can't use killTimer directly, see comment above.
- if (mFrameCallbackTimerId != -1) {
- int id = mFrameCallbackTimerId;
- mFrameCallbackTimerId = -1;
- QMetaObject::invokeMethod(this, [=] { killTimer(id); }, Qt::QueuedConnection);
- }
+ int fcbId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1);
+ if (fcbId != -1)
+ QMetaObject::invokeMethod(this, [=] { killTimer(fcbId); }, Qt::QueuedConnection);
// Start a timer for handling the case when the compositor stops sending frame callbacks.
QMetaObject::invokeMethod(this, [=] { // Again; can't do it directly
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 8c1ebe16..86139243 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -222,7 +222,7 @@ protected:
WId mWindowId;
bool mWaitingForFrameCallback = false;
bool mFrameCallbackTimedOut = false; // Whether the frame callback has timed out
- int mFrameCallbackTimerId = -1; // Started on commit, reset on frame callback
+ QAtomicInt mFrameCallbackTimerId = -1; // Started on commit, reset on frame callback
struct ::wl_callback *mFrameCallback = nullptr;
struct ::wl_event_queue *mFrameQueue = nullptr;
QWaitCondition mFrameSyncWait;
--
2.22.0

View File

@ -1,40 +0,0 @@
From 19e165aa58b4d6c2597e6732d6c7d1efe4c9b362 Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org>
Date: Sun, 23 Jun 2019 13:25:16 +0200
Subject: [PATCH 5/5] Client: Reset frame callback timer when hiding a window
If we hide a window whilst a compositor has a pending frame to show,
it's possible the compositor will not render the frame and not return
the callback.
If this happens on the next window expose we can be left with
mFrameCallbackTimedOut still true causing isExposed() to remain false
and us to not send the next buffer when we later show the window again.
Change-Id: I507410415d1a930fd5fa736412055e68fdf6c1d3
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
---
src/client/qwaylandwindow.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index c6723aa7..f1be524b 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -243,6 +243,13 @@ void QWaylandWindow::reset()
mFrameCallback = nullptr;
}
+ int timerId = mFrameCallbackTimerId.fetchAndStoreOrdered(-1);
+ if (timerId != -1) {
+ killTimer(timerId);
+ }
+ mWaitingForFrameCallback = false;
+ mFrameCallbackTimedOut = false;
+
mMask = QRegion();
mQueuedBuffer = nullptr;
}
--
2.22.0

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Fri Sep 6 08:04:41 UTC 2019 - Fabian Vogt <fabian@ritter-vogt.de>
- Update to 5.13.1:
* New bugfix release
* For more details please see:
* http://code.qt.io/cgit/qt/qtwayland.git/plain/dist/changes-5.13.1/?h=v5.13.1
- Drop patches, now upstream:
* 0001-Don-t-crash-if-we-start-a-drag-without-dragFocus.patch
* 0002-Client-Fix-stuttering-when-the-GUI-thread-is-busy.patch
* 0005-Client-Reset-frame-callback-timer-when-hiding-a-wind.patch
* 0001-Fix-use-of-private-dependency.patch
-------------------------------------------------------------------
Thu Aug 15 11:30:28 UTC 2019 - Fabian Vogt <fabian@ritter-vogt.de>

View File

@ -19,11 +19,11 @@
%define qt5_snapshot 0
%define libname libQt5WaylandCompositor5
%define base_name libqt5
%define real_version 5.13.0
%define so_version 5.13.0
%define tar_version qtwayland-everywhere-src-5.13.0
%define real_version 5.13.1
%define so_version 5.13.1
%define tar_version qtwayland-everywhere-src-5.13.1
Name: libqt5-qtwayland
Version: 5.13.0
Version: 5.13.1
Release: 0
Summary: Qt 5 Wayland Addon
License: LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only
@ -31,19 +31,11 @@ Group: Development/Libraries/X11
Url: https://www.qt.io
Source: https://download.qt.io/official_releases/qt/5.13/%{real_version}/submodules/%{tar_version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-UPSTREAM
Patch1: 0001-Don-t-crash-if-we-start-a-drag-without-dragFocus.patch
# In 5.12 branch only, not merged to 5.13 yet
Patch2: 0002-Client-Fix-stuttering-when-the-GUI-thread-is-busy.patch
# Those aren't merged upstream yet
# https://codereview.qt-project.org/c/qt/qtwayland/+/265999
Patch3: 0003-Client-Don-t-send-fake-SurfaceCreated-Destroyed-even.patch
# https://codereview.qt-project.org/c/qt/qtwayland/+/265998
Patch4: 0004-Client-Make-handleUpdate-aware-of-exposure-changes.patch
# https://codereview.qt-project.org/c/qt/qtwayland/+/265997
Patch5: 0005-Client-Reset-frame-callback-timer-when-hiding-a-wind.patch
# PATCH-FIX-UPSTREAM
Patch6: 0001-Fix-use-of-private-dependency.patch
# PATCH-FIX-OPENSUSE
Patch100: workaround-null-object.patch
BuildRequires: fdupes

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b67a6d8119628bca3301bd03992880db07d61d405534067c9cd2a598695a7cf3
size 478076

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:def836f365b8af99cc693625f2079a54a0f71f5eff3f370dcf6f30b8944caf77
size 478744