From 0f6426dabc9ed85e73b8a0d7c5d6692b87b07c274f9a3c260ebaca09c10d55ff Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Mon, 30 Sep 2019 13:17:45 +0000 Subject: [PATCH 1/8] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.14/libqt5-qtwayland?expand=0&rev=1 From 4930960475deaba0609ed873bd2f1463115f58153af08c6af59797d3aeaed228 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Sat, 5 Oct 2019 16:00:59 +0000 Subject: [PATCH 2/8] Accepting request 734738 from home:Vogtinator:qt5.14 Qt 5.14 Alpha OBS-URL: https://build.opensuse.org/request/show/734738 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.14/libqt5-qtwayland?expand=0&rev=2 --- ...d-fake-SurfaceCreated-Destroyed-even.patch | 93 ------------------- ...ndleUpdate-aware-of-exposure-changes.patch | 80 ---------------- fix-return-nonvoid-function.patch | 14 +++ libqt5-qtwayland.changes | 17 ++++ libqt5-qtwayland.spec | 17 ++-- qtwayland-everywhere-src-5.13.1.tar.xz | 3 - qtwayland-everywhere-src-5.14.0-alpha.tar.xz | 3 + workaround-null-object.patch | 21 ----- 8 files changed, 40 insertions(+), 208 deletions(-) delete mode 100644 0003-Client-Don-t-send-fake-SurfaceCreated-Destroyed-even.patch delete mode 100644 0004-Client-Make-handleUpdate-aware-of-exposure-changes.patch create mode 100644 fix-return-nonvoid-function.patch delete mode 100644 qtwayland-everywhere-src-5.13.1.tar.xz create mode 100644 qtwayland-everywhere-src-5.14.0-alpha.tar.xz delete mode 100644 workaround-null-object.patch diff --git a/0003-Client-Don-t-send-fake-SurfaceCreated-Destroyed-even.patch b/0003-Client-Don-t-send-fake-SurfaceCreated-Destroyed-even.patch deleted file mode 100644 index 4c48a22..0000000 --- a/0003-Client-Don-t-send-fake-SurfaceCreated-Destroyed-even.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 20ddfe8dffc3be253d799bc3f939a1b0e388ed73 Mon Sep 17 00:00:00 2001 -From: David Edmundson -Date: Sun, 23 Jun 2019 15:09:51 +0200 -Subject: [PATCH 3/5] Client: Don't send fake SurfaceCreated/Destroyed events - -QPlatformSurface relates to the backing store. Not the wl_surface. -They are emitted by QPlatformWindow. - -Due to a previously incorrect usage by KDE developers it was faked to -emit the events when the wl_surface is created/hidden to keep behavior. - -With QtBase a9246c7132a2c8864d3ae6cebd260bb9ee711fcb this now causes an -issue as now QWidgets react to this event in a breaking way. - -Change-Id: I2f003bc9da85f032a0053677fd281152099fc9eb ---- - .../custom-extension/client-common/customextension.cpp | 9 +++++++-- - src/client/qwaylandwindow.cpp | 10 ++-------- - src/client/qwaylandwindow_p.h | 2 +- - 3 files changed, 10 insertions(+), 11 deletions(-) - -diff --git a/examples/wayland/custom-extension/client-common/customextension.cpp b/examples/wayland/custom-extension/client-common/customextension.cpp -index aa0cb58a..16f18fd7 100644 ---- a/examples/wayland/custom-extension/client-common/customextension.cpp -+++ b/examples/wayland/custom-extension/client-common/customextension.cpp -@@ -81,8 +81,13 @@ QWindow *CustomExtension::windowForSurface(struct ::wl_surface *surface) - - bool CustomExtension::eventFilter(QObject *object, QEvent *event) - { -- if (event->type() == QEvent::PlatformSurface -- && static_cast(event)->surfaceEventType() == QPlatformSurfaceEvent::SurfaceCreated) { -+ if (event->type() == QEvent::Expose) { -+ auto ee = static_cast(event); -+ -+ if ((ee->region().isNull())) { -+ return false; -+ } -+ - QWindow *window = qobject_cast(object); - Q_ASSERT(window); - window->removeEventFilter(this); -diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp -index 7fca9783..76975b27 100644 ---- a/src/client/qwaylandwindow.cpp -+++ b/src/client/qwaylandwindow.cpp -@@ -91,7 +91,7 @@ QWaylandWindow::~QWaylandWindow() - delete mWindowDecoration; - - if (isInitialized()) -- reset(false); -+ reset(); - - const QWindow *parent = window(); - foreach (QWindow *w, QGuiApplication::topLevelWindows()) { -@@ -117,8 +117,6 @@ void QWaylandWindow::initWindow() - - if (!isInitialized()) { - initializeWlSurface(); -- QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceCreated); -- QGuiApplication::sendEvent(window(), &e); - } - - if (shouldCreateSubSurface()) { -@@ -224,12 +222,8 @@ bool QWaylandWindow::shouldCreateSubSurface() const - return QPlatformWindow::parent() != nullptr; - } - --void QWaylandWindow::reset(bool sendDestroyEvent) -+void QWaylandWindow::reset() - { -- if (isInitialized() && sendDestroyEvent) { -- QPlatformSurfaceEvent e(QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed); -- QGuiApplication::sendEvent(window(), &e); -- } - delete mShellSurface; - mShellSurface = nullptr; - delete mSubSurfaceWindow; -diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h -index 86139243..fe24224f 100644 ---- a/src/client/qwaylandwindow_p.h -+++ b/src/client/qwaylandwindow_p.h -@@ -261,7 +261,7 @@ private: - void initializeWlSurface(); - bool shouldCreateShellSurface() const; - bool shouldCreateSubSurface() const; -- void reset(bool sendDestroyEvent = true); -+ void reset(); - void sendExposeEvent(const QRect &rect); - static void closePopups(QWaylandWindow *parent); - QWaylandScreen *calculateScreenFromSurfaceEvents() const; --- -2.22.0 - diff --git a/0004-Client-Make-handleUpdate-aware-of-exposure-changes.patch b/0004-Client-Make-handleUpdate-aware-of-exposure-changes.patch deleted file mode 100644 index beff9d8..0000000 --- a/0004-Client-Make-handleUpdate-aware-of-exposure-changes.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 71a854f4eced28282df72e1b25888929799e8ee7 Mon Sep 17 00:00:00 2001 -From: David Edmundson -Date: Sun, 23 Jun 2019 14:48:30 +0200 -Subject: [PATCH 4/5] Client: Make handleUpdate aware of exposure changes - -The wl_surface can be destroyed whilst a render is happening. Calling -wl_surface::frame after the window is reset can crash as wl_surface is -null. - -Change-Id: I139a9b234cb6acba81d6c1d5fa58629904a25053 ---- - src/client/qwaylandwindow.cpp | 8 ++++++++ - src/client/qwaylandwindow_p.h | 4 ++++ - 2 files changed, 12 insertions(+) - -diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp -index 76975b27..c6723aa7 100644 ---- a/src/client/qwaylandwindow.cpp -+++ b/src/client/qwaylandwindow.cpp -@@ -72,6 +72,8 @@ Q_LOGGING_CATEGORY(lcWaylandBackingstore, "qt.qpa.wayland.backingstore") - - QWaylandWindow *QWaylandWindow::mMouseGrab = nullptr; - -+QReadWriteLock mSurfaceLock; -+ - QWaylandWindow::QWaylandWindow(QWindow *window) - : QPlatformWindow(window) - , mDisplay(waylandScreen()->display()) -@@ -197,6 +199,7 @@ void QWaylandWindow::initWindow() - - void QWaylandWindow::initializeWlSurface() - { -+ QWriteLocker lock(&mSurfaceLock); - init(mDisplay->createSurface(static_cast(this))); - } - -@@ -230,6 +233,7 @@ void QWaylandWindow::reset() - mSubSurfaceWindow = nullptr; - if (isInitialized()) { - emit wlSurfaceDestroyed(); -+ QWriteLocker lock(&mSurfaceLock); - destroy(); - } - mScreens.clear(); -@@ -1142,6 +1146,10 @@ void QWaylandWindow::requestUpdate() - void QWaylandWindow::handleUpdate() - { - // TODO: Should sync subsurfaces avoid requesting frame callbacks? -+ QReadLocker lock(&mSurfaceLock); -+ if (!isInitialized()) { -+ return; -+ } - - if (mFrameCallback) { - wl_callback_destroy(mFrameCallback); -diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h -index fe24224f..97884ba4 100644 ---- a/src/client/qwaylandwindow_p.h -+++ b/src/client/qwaylandwindow_p.h -@@ -53,6 +53,8 @@ - - #include - #include -+#include -+ - #include - #include - #include -@@ -277,6 +279,8 @@ private: - static QMutex mFrameSyncMutex; - static QWaylandWindow *mMouseGrab; - -+ QReadWriteLock mSurfaceLock; -+ - friend class QWaylandSubSurface; - }; - --- -2.22.0 - diff --git a/fix-return-nonvoid-function.patch b/fix-return-nonvoid-function.patch new file mode 100644 index 0000000..8e7dc50 --- /dev/null +++ b/fix-return-nonvoid-function.patch @@ -0,0 +1,14 @@ +Index: qtwayland-everywhere-src-5.14.0-alpha/src/client/qwaylandinputdevice.cpp +=================================================================== +--- qtwayland-everywhere-src-5.14.0-alpha.orig/src/client/qwaylandinputdevice.cpp ++++ qtwayland-everywhere-src-5.14.0-alpha/src/client/qwaylandinputdevice.cpp +@@ -968,6 +968,9 @@ bool QWaylandInputDevice::Pointer::Frame + case axis_source_finger: + case axis_source_continuous: + return !delta.isNull(); ++ default: ++ Q_UNREACHABLE(); ++ return false; + } + } + diff --git a/libqt5-qtwayland.changes b/libqt5-qtwayland.changes index 78d1091..bd57e29 100644 --- a/libqt5-qtwayland.changes +++ b/libqt5-qtwayland.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Mon Sep 30 13:30:40 UTC 2019 - Fabian Vogt + +- Update to 5.14.0-alpha: + * New feature release + * No changelog available + * For more details about Qt 5.14 please see: + https://wiki.qt.io/New_Features_in_Qt_5.14 +- Drop patch, cause of the regression was reverted in qtbase: + * 0003-Client-Don-t-send-fake-SurfaceCreated-Destroyed-even.patch +- Drop patch, now upstream: + * 0004-Client-Make-handleUpdate-aware-of-exposure-changes.patch +- Drop patch, it's (hopefully) no longer necessary: + * workaround-null-object.patch +- Add patch to fix build: + * fix-return-nonvoid-function.patch + ------------------------------------------------------------------- Fri Sep 6 08:04:41 UTC 2019 - Fabian Vogt diff --git a/libqt5-qtwayland.spec b/libqt5-qtwayland.spec index 974bcc0..ecd0b79 100644 --- a/libqt5-qtwayland.spec +++ b/libqt5-qtwayland.spec @@ -19,25 +19,20 @@ %define qt5_snapshot 0 %define libname libQt5WaylandCompositor5 %define base_name libqt5 -%define real_version 5.13.1 -%define so_version 5.13.1 -%define tar_version qtwayland-everywhere-src-5.13.1 +%define real_version 5.14.0-alpha +%define so_version 5.14.0 +%define tar_version qtwayland-everywhere-src-5.14.0-alpha Name: libqt5-qtwayland -Version: 5.13.1 +Version: 5.14.0~alpha Release: 0 Summary: Qt 5 Wayland Addon License: LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only 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 +Source: https://download.qt.io/development_releases/qt/5.14/%{real_version}/submodules/%{tar_version}.tar.xz Source1: baselibs.conf -# 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 # PATCH-FIX-OPENSUSE -Patch100: workaround-null-object.patch +Patch100: fix-return-nonvoid-function.patch BuildRequires: fdupes BuildRequires: libqt5-qtbase-private-headers-devel >= %{version} BuildRequires: libqt5-qtdeclarative-private-headers-devel >= %{version} diff --git a/qtwayland-everywhere-src-5.13.1.tar.xz b/qtwayland-everywhere-src-5.13.1.tar.xz deleted file mode 100644 index 203bc48..0000000 --- a/qtwayland-everywhere-src-5.13.1.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:def836f365b8af99cc693625f2079a54a0f71f5eff3f370dcf6f30b8944caf77 -size 478744 diff --git a/qtwayland-everywhere-src-5.14.0-alpha.tar.xz b/qtwayland-everywhere-src-5.14.0-alpha.tar.xz new file mode 100644 index 0000000..5390a41 --- /dev/null +++ b/qtwayland-everywhere-src-5.14.0-alpha.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:942832adf3fdd7691fef60f17487a2e51149de0e311b378cfbaa0083103aae0f +size 540596 diff --git a/workaround-null-object.patch b/workaround-null-object.patch deleted file mode 100644 index 000c99d..0000000 --- a/workaround-null-object.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Fabian Vogt -Subject: Work around crash in QtWaylandClient::QWaylandEglWindow::updateSurface -References: kde#381630 - -object() is nullptr when it crashes, so do not try to reference it. -This is only a workaround as object() should never be nullptr AFAICT. -So far I haven't discovered any bad side effects. - -Index: qtwayland-opensource-src-5.9.1/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp -=================================================================== ---- qtwayland-opensource-src-5.9.1.orig/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp -+++ qtwayland-opensource-src-5.9.1/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp -@@ -112,7 +112,7 @@ void QWaylandEglWindow::updateSurface(bo - // mesa's egl returns NULL if we try to create a, invalid wl_egl_window, however not all EGL - // implementations may do that, so check the size ourself. Besides, we must deal with resizing - // a valid window to 0x0, which would make it invalid. Hence, destroy it. -- if (sizeWithMargins.isEmpty()) { -+ if (sizeWithMargins.isEmpty() || !object()) { - if (m_eglSurface) { - eglDestroySurface(m_clientBufferIntegration->eglDisplay(), m_eglSurface); - m_eglSurface = 0; From ef7042c80a53eaee6cb03b3b32fd66e8d394b9569730ecc96567342ac4b2d7eb Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Mon, 28 Oct 2019 17:54:03 +0000 Subject: [PATCH 3/8] Accepting request 743230 from home:Vogtinator:qt5.14 Qt 5.14.0 Beta 2 OBS-URL: https://build.opensuse.org/request/show/743230 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.14/libqt5-qtwayland?expand=0&rev=3 --- libqt5-qtwayland.changes | 14 ++++++++++++++ libqt5-qtwayland.spec | 6 +++--- qtwayland-everywhere-src-5.14.0-alpha.tar.xz | 3 --- qtwayland-everywhere-src-5.14.0-beta2.tar.xz | 3 +++ 4 files changed, 20 insertions(+), 6 deletions(-) delete mode 100644 qtwayland-everywhere-src-5.14.0-alpha.tar.xz create mode 100644 qtwayland-everywhere-src-5.14.0-beta2.tar.xz diff --git a/libqt5-qtwayland.changes b/libqt5-qtwayland.changes index bd57e29..ee5cf8d 100644 --- a/libqt5-qtwayland.changes +++ b/libqt5-qtwayland.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Oct 24 13:23:10 UTC 2019 - Fabian Vogt + +- Update to 5.14.0-beta2: + * New bugfix release + * No changelog available + +------------------------------------------------------------------- +Tue Oct 15 12:34:55 UTC 2019 - Fabian Vogt + +- Update to 5.14.0-beta1: + * New bugfix release + * No changelog available + ------------------------------------------------------------------- Mon Sep 30 13:30:40 UTC 2019 - Fabian Vogt diff --git a/libqt5-qtwayland.spec b/libqt5-qtwayland.spec index ecd0b79..d5420dc 100644 --- a/libqt5-qtwayland.spec +++ b/libqt5-qtwayland.spec @@ -19,11 +19,11 @@ %define qt5_snapshot 0 %define libname libQt5WaylandCompositor5 %define base_name libqt5 -%define real_version 5.14.0-alpha +%define real_version 5.14.0-beta2 %define so_version 5.14.0 -%define tar_version qtwayland-everywhere-src-5.14.0-alpha +%define tar_version qtwayland-everywhere-src-5.14.0-beta2 Name: libqt5-qtwayland -Version: 5.14.0~alpha +Version: 5.14.0~beta2 Release: 0 Summary: Qt 5 Wayland Addon License: LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only diff --git a/qtwayland-everywhere-src-5.14.0-alpha.tar.xz b/qtwayland-everywhere-src-5.14.0-alpha.tar.xz deleted file mode 100644 index 5390a41..0000000 --- a/qtwayland-everywhere-src-5.14.0-alpha.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:942832adf3fdd7691fef60f17487a2e51149de0e311b378cfbaa0083103aae0f -size 540596 diff --git a/qtwayland-everywhere-src-5.14.0-beta2.tar.xz b/qtwayland-everywhere-src-5.14.0-beta2.tar.xz new file mode 100644 index 0000000..abd64c6 --- /dev/null +++ b/qtwayland-everywhere-src-5.14.0-beta2.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8918df33b2f8273e044b615affcc7ae364d73ac177559b65e41c565df22fbb08 +size 541404 From 2b8b1516e68953589e0328d4992a5b859cb03535f38ee0ea507bd9838e60e083 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Thu, 14 Nov 2019 08:34:41 +0000 Subject: [PATCH 4/8] Accepting request 748159 from home:Vogtinator:qt5.14 Qt 5.14 Beta 3 OBS-URL: https://build.opensuse.org/request/show/748159 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.14/libqt5-qtwayland?expand=0&rev=4 --- libqt5-qtwayland.changes | 7 +++++++ libqt5-qtwayland.spec | 6 +++--- qtwayland-everywhere-src-5.14.0-beta2.tar.xz | 3 --- qtwayland-everywhere-src-5.14.0-beta3.tar.xz | 3 +++ 4 files changed, 13 insertions(+), 6 deletions(-) delete mode 100644 qtwayland-everywhere-src-5.14.0-beta2.tar.xz create mode 100644 qtwayland-everywhere-src-5.14.0-beta3.tar.xz diff --git a/libqt5-qtwayland.changes b/libqt5-qtwayland.changes index ee5cf8d..739bdbe 100644 --- a/libqt5-qtwayland.changes +++ b/libqt5-qtwayland.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Nov 12 13:03:32 UTC 2019 - Fabian Vogt + +- Update to 5.14.0-beta3: + * New bugfix release + * No changelog available + ------------------------------------------------------------------- Thu Oct 24 13:23:10 UTC 2019 - Fabian Vogt diff --git a/libqt5-qtwayland.spec b/libqt5-qtwayland.spec index d5420dc..f935735 100644 --- a/libqt5-qtwayland.spec +++ b/libqt5-qtwayland.spec @@ -19,11 +19,11 @@ %define qt5_snapshot 0 %define libname libQt5WaylandCompositor5 %define base_name libqt5 -%define real_version 5.14.0-beta2 +%define real_version 5.14.0-beta3 %define so_version 5.14.0 -%define tar_version qtwayland-everywhere-src-5.14.0-beta2 +%define tar_version qtwayland-everywhere-src-5.14.0-beta3 Name: libqt5-qtwayland -Version: 5.14.0~beta2 +Version: 5.14.0~beta3 Release: 0 Summary: Qt 5 Wayland Addon License: LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only diff --git a/qtwayland-everywhere-src-5.14.0-beta2.tar.xz b/qtwayland-everywhere-src-5.14.0-beta2.tar.xz deleted file mode 100644 index abd64c6..0000000 --- a/qtwayland-everywhere-src-5.14.0-beta2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8918df33b2f8273e044b615affcc7ae364d73ac177559b65e41c565df22fbb08 -size 541404 diff --git a/qtwayland-everywhere-src-5.14.0-beta3.tar.xz b/qtwayland-everywhere-src-5.14.0-beta3.tar.xz new file mode 100644 index 0000000..2f44a9f --- /dev/null +++ b/qtwayland-everywhere-src-5.14.0-beta3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:890c362c8d9e23d8b927b402999d2cb497ce30635c77d0fdb87b66d3943650e0 +size 543084 From f1a402d71fde841c22e07620f0b854dcb98c79a7922b01c91f311b6b950e98a3 Mon Sep 17 00:00:00 2001 From: Luca Beltrame Date: Thu, 5 Dec 2019 09:41:18 +0000 Subject: [PATCH 5/8] Accepting request 754286 from home:Vogtinator:qt5.14 Qt 5.14.0 RC1 OBS-URL: https://build.opensuse.org/request/show/754286 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.14/libqt5-qtwayland?expand=0&rev=5 --- ...Avoid-animating-single-frame-cursors.patch | 122 ++++++++++++++++++ libqt5-qtwayland.changes | 12 ++ libqt5-qtwayland.spec | 8 +- qtwayland-everywhere-src-5.14.0-beta3.tar.xz | 3 - qtwayland-everywhere-src-5.14.0-rc.tar.xz | 3 + 5 files changed, 142 insertions(+), 6 deletions(-) create mode 100644 0001-Avoid-animating-single-frame-cursors.patch delete mode 100644 qtwayland-everywhere-src-5.14.0-beta3.tar.xz create mode 100644 qtwayland-everywhere-src-5.14.0-rc.tar.xz diff --git a/0001-Avoid-animating-single-frame-cursors.patch b/0001-Avoid-animating-single-frame-cursors.patch new file mode 100644 index 0000000..ee24852 --- /dev/null +++ b/0001-Avoid-animating-single-frame-cursors.patch @@ -0,0 +1,122 @@ +From 8a200369acf25841cb4fbfbc6b3866d851388306 Mon Sep 17 00:00:00 2001 +From: David Edmundson +Date: Thu, 28 Nov 2019 02:31:17 +0100 +Subject: [PATCH] Avoid animating single frame cursors + +Currently to determine if a cursor is animated or not we check the +cursor theme delay. + +This doesn't work in practice as by default many cursor themes have a +delay of 50 set even if they don't animate. + +This comes from xcursorgen which specifies a delay of 50ms if there +isn't anything set in the config. +(https://github.com/freedesktop/xcursorgen/blob/master/xcursorgen.c#L92) + +Given many themes will have a delay we should also check the number of +images in a given cursor. + +In order to do that without a double lookup QWaylandCursor needed to +return the native wl_cursor, not wl_cursor_image and move the relevant +logic. + +Change-Id: Ie782ace8054910ae76e61cab33ceca0377194929 +Reviewed-by: Johan Helsing +--- + src/client/qwaylandcursor.cpp | 12 ++---------- + src/client/qwaylandcursor_p.h | 3 +-- + src/client/qwaylandinputdevice.cpp | 16 ++++++++++++---- + 3 files changed, 15 insertions(+), 16 deletions(-) + +diff --git a/src/client/qwaylandcursor.cpp b/src/client/qwaylandcursor.cpp +index 4356b23a..1d3d88be 100644 +--- a/src/client/qwaylandcursor.cpp ++++ b/src/client/qwaylandcursor.cpp +@@ -219,7 +219,7 @@ wl_cursor *QWaylandCursorTheme::requestCursor(WaylandCursor shape) + return nullptr; + } + +-::wl_cursor_image *QWaylandCursorTheme::cursorImage(Qt::CursorShape shape, uint millisecondsIntoAnimation) ++::wl_cursor *QWaylandCursorTheme::cursor(Qt::CursorShape shape) + { + struct wl_cursor *waylandCursor = nullptr; + +@@ -237,15 +237,7 @@ wl_cursor *QWaylandCursorTheme::requestCursor(WaylandCursor shape) + return nullptr; + } + +- int frame = wl_cursor_frame(waylandCursor, millisecondsIntoAnimation); +- ::wl_cursor_image *image = waylandCursor->images[frame]; +- ::wl_buffer *buffer = wl_cursor_image_get_buffer(image); +- if (!buffer) { +- qCWarning(lcQpaWayland) << "Could not find buffer for cursor"; +- return nullptr; +- } +- +- return image; ++ return waylandCursor; + } + + QWaylandCursor::QWaylandCursor(QWaylandDisplay *display) +diff --git a/src/client/qwaylandcursor_p.h b/src/client/qwaylandcursor_p.h +index a4605f3d..751ffa68 100644 +--- a/src/client/qwaylandcursor_p.h ++++ b/src/client/qwaylandcursor_p.h +@@ -75,7 +75,7 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandCursorTheme + public: + static QWaylandCursorTheme *create(QWaylandShm *shm, int size, const QString &themeName); + ~QWaylandCursorTheme(); +- ::wl_cursor_image *cursorImage(Qt::CursorShape shape, uint millisecondsIntoAnimation = 0); ++ ::wl_cursor *cursor(Qt::CursorShape shape); + + private: + enum WaylandCursor { +@@ -129,7 +129,6 @@ public: + void setPos(const QPoint &pos) override; + + static QSharedPointer cursorBitmapBuffer(QWaylandDisplay *display, const QCursor *cursor); +- struct wl_cursor_image *cursorImage(Qt::CursorShape shape); + + private: + QWaylandDisplay *mDisplay = nullptr; +diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp +index a4098edd..d812918e 100644 +--- a/src/client/qwaylandinputdevice.cpp ++++ b/src/client/qwaylandinputdevice.cpp +@@ -283,8 +283,8 @@ void QWaylandInputDevice::Pointer::updateCursorTheme() + if (!mCursor.theme) + return; // A warning has already been printed in loadCursorTheme + +- if (auto *arrow = mCursor.theme->cursorImage(Qt::ArrowCursor)) { +- int arrowPixelSize = qMax(arrow->width, arrow->height); // Not all cursor themes are square ++ if (auto *arrow = mCursor.theme->cursor(Qt::ArrowCursor)) { ++ int arrowPixelSize = qMax(arrow->images[0]->width, arrow->images[0]->height); // Not all cursor themes are square + while (scale > 1 && arrowPixelSize / scale < cursorSize()) + --scale; + } else { +@@ -326,12 +326,20 @@ void QWaylandInputDevice::Pointer::updateCursor() + + // Set from shape using theme + uint time = seat()->mCursor.animationTimer.elapsed(); +- if (struct ::wl_cursor_image *image = mCursor.theme->cursorImage(shape, time)) { ++ ++ if (struct ::wl_cursor *waylandCursor = mCursor.theme->cursor(shape)) { ++ int frame = wl_cursor_frame(waylandCursor, time); ++ ::wl_cursor_image *image = waylandCursor->images[frame]; ++ + struct wl_buffer *buffer = wl_cursor_image_get_buffer(image); ++ if (!buffer) { ++ qCWarning(lcQpaWayland) << "Could not find buffer for cursor" << shape; ++ return; ++ } + int bufferScale = mCursor.themeBufferScale; + QPoint hotspot = QPoint(image->hotspot_x, image->hotspot_y) / bufferScale; + QSize size = QSize(image->width, image->height) / bufferScale; +- bool animated = image->delay > 0; ++ bool animated = waylandCursor->image_count > 1 && image->delay > 0; + getOrCreateCursorSurface()->update(buffer, hotspot, size, bufferScale, animated); + return; + } +-- +2.23.0 + diff --git a/libqt5-qtwayland.changes b/libqt5-qtwayland.changes index 739bdbe..420463c 100644 --- a/libqt5-qtwayland.changes +++ b/libqt5-qtwayland.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Dec 4 14:38:13 UTC 2019 - Fabian Vogt + +- Update to 5.14.0-rc: + * New bugfix release + * No changelog available + * For more details please see: + * For more details about Qt 5.14 please see: + https://wiki.qt.io/New_Features_in_Qt_5.14 +- Add patch to address performance regression (kde#412924): + * 0001-Avoid-animating-single-frame-cursors.patch + ------------------------------------------------------------------- Tue Nov 12 13:03:32 UTC 2019 - Fabian Vogt diff --git a/libqt5-qtwayland.spec b/libqt5-qtwayland.spec index f935735..c830282 100644 --- a/libqt5-qtwayland.spec +++ b/libqt5-qtwayland.spec @@ -19,11 +19,11 @@ %define qt5_snapshot 0 %define libname libQt5WaylandCompositor5 %define base_name libqt5 -%define real_version 5.14.0-beta3 +%define real_version 5.14.0-rc %define so_version 5.14.0 -%define tar_version qtwayland-everywhere-src-5.14.0-beta3 +%define tar_version qtwayland-everywhere-src-5.14.0-rc Name: libqt5-qtwayland -Version: 5.14.0~beta3 +Version: 5.14.0~rc Release: 0 Summary: Qt 5 Wayland Addon License: LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only @@ -31,6 +31,8 @@ Group: Development/Libraries/X11 Url: https://www.qt.io Source: https://download.qt.io/development_releases/qt/5.14/%{real_version}/submodules/%{tar_version}.tar.xz Source1: baselibs.conf +# PATCH-FIX-UPSTREAM +Patch1: 0001-Avoid-animating-single-frame-cursors.patch # PATCH-FIX-OPENSUSE Patch100: fix-return-nonvoid-function.patch BuildRequires: fdupes diff --git a/qtwayland-everywhere-src-5.14.0-beta3.tar.xz b/qtwayland-everywhere-src-5.14.0-beta3.tar.xz deleted file mode 100644 index 2f44a9f..0000000 --- a/qtwayland-everywhere-src-5.14.0-beta3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:890c362c8d9e23d8b927b402999d2cb497ce30635c77d0fdb87b66d3943650e0 -size 543084 diff --git a/qtwayland-everywhere-src-5.14.0-rc.tar.xz b/qtwayland-everywhere-src-5.14.0-rc.tar.xz new file mode 100644 index 0000000..ce3009c --- /dev/null +++ b/qtwayland-everywhere-src-5.14.0-rc.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25beeafb0965610a07b5e3c25739cd3a3ce7b2d3b02b3705ed6616a483e0e969 +size 546284 From b4aff0772aedb562a75059f293190eb894b42bf682363bf13489d22e77950ef2 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Thu, 12 Dec 2019 20:39:55 +0000 Subject: [PATCH 6/8] Accepting request 756177 from home:Vogtinator:qt5.14 Qt 5.14.0 final - not fully built yet OBS-URL: https://build.opensuse.org/request/show/756177 OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.14/libqt5-qtwayland?expand=0&rev=6 --- libqt5-qtwayland.changes | 10 ++++++++ libqt5-qtwayland.spec | 28 +++++++++-------------- qtwayland-everywhere-src-5.14.0-rc.tar.xz | 3 --- qtwayland-everywhere-src-5.14.0.tar.xz | 3 +++ 4 files changed, 24 insertions(+), 20 deletions(-) delete mode 100644 qtwayland-everywhere-src-5.14.0-rc.tar.xz create mode 100644 qtwayland-everywhere-src-5.14.0.tar.xz diff --git a/libqt5-qtwayland.changes b/libqt5-qtwayland.changes index 420463c..d2c486f 100644 --- a/libqt5-qtwayland.changes +++ b/libqt5-qtwayland.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Thu Dec 12 12:55:17 UTC 2019 - Fabian Vogt + +- Update to 5.14.0: + * New bugfix release + * For the changes between 5.13.2 and 5.14.0 please see: + https://code.qt.io/cgit/qt/qtwayland.git/tree/dist/changes-5.14.0?h=v5.14.0 + * For the changes between 5.13.1 and 5.13.2 please see: + https://code.qt.io/cgit/qt/qtwayland.git/tree/dist/changes-5.13.2?h=v5.14.0 + ------------------------------------------------------------------- Wed Dec 4 14:38:13 UTC 2019 - Fabian Vogt diff --git a/libqt5-qtwayland.spec b/libqt5-qtwayland.spec index c830282..c9b6b1d 100644 --- a/libqt5-qtwayland.spec +++ b/libqt5-qtwayland.spec @@ -19,17 +19,17 @@ %define qt5_snapshot 0 %define libname libQt5WaylandCompositor5 %define base_name libqt5 -%define real_version 5.14.0-rc +%define real_version 5.14.0 %define so_version 5.14.0 -%define tar_version qtwayland-everywhere-src-5.14.0-rc +%define tar_version qtwayland-everywhere-src-5.14.0 Name: libqt5-qtwayland -Version: 5.14.0~rc +Version: 5.14.0 Release: 0 Summary: Qt 5 Wayland Addon -License: LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only +License: (LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only) AND GPL-3.0-only Group: Development/Libraries/X11 Url: https://www.qt.io -Source: https://download.qt.io/development_releases/qt/5.14/%{real_version}/submodules/%{tar_version}.tar.xz +Source: https://download.qt.io/official_releases/qt/5.14/%{real_version}/submodules/%{tar_version}.tar.xz Source1: baselibs.conf # PATCH-FIX-UPSTREAM Patch1: 0001-Avoid-animating-single-frame-cursors.patch @@ -150,25 +150,21 @@ rm -f %{buildroot}%{_libqt5_libdir}/lib*.la fdupes -s %{buildroot} %files -%defattr(-,root,root,-) -%doc LICENSE.* +%license LICENSE.* %{_libqt5_bindir}/qtwaylandscanner %{_libqt5_plugindir}/ %{_libqt5_archdatadir}/qml/QtWayland/ %files -n libQt5WaylandCompositor5 -%defattr(-,root,root,-) -%doc LICENSE.* +%license LICENSE.* %{_libqt5_libdir}/libQt5WaylandCompositor.so.* %files -n libQt5WaylandClient5 -%defattr(-,root,root,-) -%doc LICENSE.* +%license LICENSE.* %{_libqt5_libdir}/libQt5WaylandClient.so.* %files devel -%defattr(-,root,root,-) -%doc LICENSE.* +%license LICENSE.* %{_libqt5_libdir}/*.prl %{_libqt5_libdir}/*.so %{_libqt5_libdir}/pkgconfig/* @@ -178,13 +174,11 @@ fdupes -s %{buildroot} %{_libqt5_includedir}/Qt* %files private-headers-devel -%defattr(-,root,root,755) -%doc LICENSE.* +%license LICENSE.* %{_libqt5_includedir}/Qt*/%{so_version} %files examples -%defattr(-,root,root,755) -%doc LICENSE.* +%license LICENSE.* %{_libqt5_examplesdir}/ %changelog diff --git a/qtwayland-everywhere-src-5.14.0-rc.tar.xz b/qtwayland-everywhere-src-5.14.0-rc.tar.xz deleted file mode 100644 index ce3009c..0000000 --- a/qtwayland-everywhere-src-5.14.0-rc.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:25beeafb0965610a07b5e3c25739cd3a3ce7b2d3b02b3705ed6616a483e0e969 -size 546284 diff --git a/qtwayland-everywhere-src-5.14.0.tar.xz b/qtwayland-everywhere-src-5.14.0.tar.xz new file mode 100644 index 0000000..9a39074 --- /dev/null +++ b/qtwayland-everywhere-src-5.14.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32d4fadb3a8dcee8953e6d92ee567927cd7649be6fc8dd378480664902c22610 +size 544292 From 5f2688d92262fd16086ba30b47a80e3d1db22f8f1d5070299c23354c53d039c3 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Mon, 16 Dec 2019 09:42:29 +0000 Subject: [PATCH 7/8] OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.14/libqt5-qtwayland?expand=0&rev=7 --- libqt5-qtwayland.changes | 5 +++++ libqt5-qtwayland.spec | 32 +++++++++++++++----------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/libqt5-qtwayland.changes b/libqt5-qtwayland.changes index d2c486f..d6f6867 100644 --- a/libqt5-qtwayland.changes +++ b/libqt5-qtwayland.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Dec 16 09:42:21 UTC 2019 - Christophe Giboudeaux + +- Update the license tags. + ------------------------------------------------------------------- Thu Dec 12 12:55:17 UTC 2019 - Fabian Vogt diff --git a/libqt5-qtwayland.spec b/libqt5-qtwayland.spec index c9b6b1d..0f8444f 100644 --- a/libqt5-qtwayland.spec +++ b/libqt5-qtwayland.spec @@ -1,7 +1,7 @@ # # spec file for package libqt5-qtwayland # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -26,9 +26,10 @@ Name: libqt5-qtwayland Version: 5.14.0 Release: 0 Summary: Qt 5 Wayland Addon -License: (LGPL-2.1-with-Qt-Company-Qt-exception-1.1 or LGPL-3.0-only) AND GPL-3.0-only +# The wayland compositor files are GPL-3.0-or-later +License: GPL-3.0-or-later AND (LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later)) Group: Development/Libraries/X11 -Url: https://www.qt.io +URL: https://www.qt.io Source: https://download.qt.io/official_releases/qt/5.14/%{real_version}/submodules/%{tar_version}.tar.xz Source1: baselibs.conf # PATCH-FIX-UPSTREAM @@ -38,11 +39,8 @@ Patch100: fix-return-nonvoid-function.patch BuildRequires: fdupes BuildRequires: libqt5-qtbase-private-headers-devel >= %{version} BuildRequires: libqt5-qtdeclarative-private-headers-devel >= %{version} +BuildRequires: pkgconfig BuildRequires: xz -%if 0%{?suse_version} < 1330 -# It does not build with the default compiler (GCC 4.8) on Leap 42.x -BuildRequires: gcc7-c++ -%endif BuildRequires: pkgconfig(egl) BuildRequires: pkgconfig(wayland-client) >= 1.1.0 BuildRequires: pkgconfig(wayland-egl) @@ -50,6 +48,10 @@ BuildRequires: pkgconfig(wayland-server) >= 1.1.0 BuildRequires: pkgconfig(xcomposite) BuildRequires: pkgconfig(xkbcommon) >= 0.2.0 Conflicts: qtwayland +%if 0%{?suse_version} < 1330 +# It does not build with the default compiler (GCC 4.8) on Leap 42.x +BuildRequires: gcc7-c++ +%endif %if %{qt5_snapshot} #to create the forwarding headers BuildRequires: perl @@ -72,9 +74,9 @@ Development package to build Qt-based compositors. %package private-headers-devel Summary: Qt 5 Wayland Addon Non-ABI stable experimental API files Group: Development/Libraries/C and C++ -BuildArch: noarch Requires: %{name}-devel = %{version} Requires: libqt5-qtbase-private-headers-devel +BuildArch: noarch %description private-headers-devel This package provides private headers of libqt5-qtwayland that are normally @@ -101,6 +103,7 @@ Qt is a set of libraries for developing applications. %package examples Summary: Qt5 wayland examples Group: Development/Libraries/X11 +License: BSD-3-Clause Recommends: %{name}-devel %description examples @@ -110,15 +113,10 @@ Examples for libqt5-qtwayland module. %autosetup -p1 -n %{tar_version} %post -n libQt5WaylandCompositor5 -p /sbin/ldconfig - %postun -n libQt5WaylandCompositor5 -p /sbin/ldconfig - %post -n libQt5WaylandClient5 -p /sbin/ldconfig - %postun -n libQt5WaylandClient5 -p /sbin/ldconfig - %post -p /sbin/ldconfig - %postun -p /sbin/ldconfig %build @@ -137,10 +135,10 @@ mkdir .git export CXX=g++-7 %endif -%{make_jobs} +%make_jobs %install -%{qmake5_install} +%qmake5_install find %{buildroot}%{_libdir} -type f -name '*la' -print -exec perl -pi -e 's, -L%{_builddir}/\S+,,g' {} \; find %{buildroot}%{_libdir}/pkgconfig -type f -name '*pc' -print -exec perl -pi -e 's, -L%{_builddir}/\S+,,g' {} \; @@ -156,7 +154,7 @@ fdupes -s %{buildroot} %{_libqt5_archdatadir}/qml/QtWayland/ %files -n libQt5WaylandCompositor5 -%license LICENSE.* +%license LICENSE.* %{_libqt5_libdir}/libQt5WaylandCompositor.so.* %files -n libQt5WaylandClient5 From 3e0f65a811f4b779abf56978dc9d3eefa1cb33cbb08baf1299a2b40b20cc556f Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Sun, 22 Dec 2019 22:54:14 +0000 Subject: [PATCH 8/8] - Remove unneeded parentheses in License tag OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:5.14/libqt5-qtwayland?expand=0&rev=8 --- libqt5-qtwayland.changes | 5 +++++ libqt5-qtwayland.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libqt5-qtwayland.changes b/libqt5-qtwayland.changes index d6f6867..cd4f50b 100644 --- a/libqt5-qtwayland.changes +++ b/libqt5-qtwayland.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Dec 22 22:52:51 UTC 2019 - Fabian Vogt + +- Remove unneeded parentheses in License tag + ------------------------------------------------------------------- Mon Dec 16 09:42:21 UTC 2019 - Christophe Giboudeaux diff --git a/libqt5-qtwayland.spec b/libqt5-qtwayland.spec index 0f8444f..218bc67 100644 --- a/libqt5-qtwayland.spec +++ b/libqt5-qtwayland.spec @@ -27,7 +27,7 @@ Version: 5.14.0 Release: 0 Summary: Qt 5 Wayland Addon # The wayland compositor files are GPL-3.0-or-later -License: GPL-3.0-or-later AND (LGPL-3.0-only OR (GPL-2.0-only OR GPL-3.0-or-later)) +License: GPL-3.0-or-later AND (LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-or-later) Group: Development/Libraries/X11 URL: https://www.qt.io Source: https://download.qt.io/official_releases/qt/5.14/%{real_version}/submodules/%{tar_version}.tar.xz