public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwayland/files/, dev-qt/qtwayland/
Date: Tue,  8 Feb 2022 19:58:57 +0000 (UTC)	[thread overview]
Message-ID: <1644350309.dd788798d12a04fb9c052c5df2d111a052e07ab0.asturm@gentoo> (raw)

commit:     dd788798d12a04fb9c052c5df2d111a052e07ab0
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  8 19:55:08 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Feb  8 19:58:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd788798

dev-qt/qtwayland: Add upstream-pending fixes in advance

- client: Gracefully handle shutdown and window hiding
- Use proper dependencies in compile tests
- Client: Remove mWaitingForUpdateDelivery
- Wayland mutex fixes

See also:
https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/23
https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/33
https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/35
https://invent.kde.org/qt/qt/qtwayland/-/merge_requests/34

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=449163
QTBUG: https://bugreports.qt.io/browse/QTBUG-91264
QTBUG: https://bugreports.qt.io/browse/QTBUG-90037
QTBUG: https://bugreports.qt.io/browse/QTBUG-100475
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 dev-qt/qtwayland/Manifest                          |   1 +
 .../qtwayland-5.15.2-QTBUG-90037-QTBUG-91264.patch | 131 +++++++++++++++++++++
 .../files/qtwayland-5.15.2-fix-qmake-deps.patch    | 126 ++++++++++++++++++++
 .../files/qtwayland-5.15.2-fixup-mutexes.patch     |  87 ++++++++++++++
 .../qtwayland-5.15.2-guard-mResizeDirty.patch      |  37 ++++++
 ...d-5.15.2-remove-mWaitingForUpdateDelivery.patch |  79 +++++++++++++
 dev-qt/qtwayland/qtwayland-5.15.2-r19.ebuild       |  52 ++++++++
 7 files changed, 513 insertions(+)

diff --git a/dev-qt/qtwayland/Manifest b/dev-qt/qtwayland/Manifest
index b5b66bd5c2dd..2ff54b09a0bf 100644
--- a/dev-qt/qtwayland/Manifest
+++ b/dev-qt/qtwayland/Manifest
@@ -1,2 +1,3 @@
 DIST qtwayland-5.15.2-4644d51f.tar.gz 831697 BLAKE2B c3d60416ef71030018918ec5157122e2585d270d5aa1a74d66874a33f14f0c4ac85da5a1dd7bfb422a1090f79e5d2c08763c68fe724416b34bad16f945d1740c SHA512 e350396e9bdfa6f0fda938af74c722792d50473eb3d786442ba11919e7801f0cd8d045916c8e49d8a63ffd966376cb74e7cc1c3d4d1732e71061fb8343a497d3
 DIST qtwayland-5.15.2-867540b9.tar.gz 830061 BLAKE2B b831288d6a3e671631b4df00eb1edb72e35128f3ed5a73983b3e15193f554fddcd0337deb832d44b795d2e37f0601fe35b8b0fcb5986bcc44154d172f3a54193 SHA512 b834802811d9f65559ef5e7468189b53c666e390aa09edeb490e5fee2dece13082b11da0f8b5924b89f7dc8e1eba375a485940f4dfbf0445f3d1e96033e33f24
+DIST qtwayland-5.15.2-ce2caf49.tar.gz 831808 BLAKE2B af7006f3ce5bb262710c5405f20107239140afe5c7f2b8b10ac834b7e41076a274adbf34152cba3fed19538f653f70faffb1255e622b8607d34f5a4695603461 SHA512 8eaf58da68311b072f5d0192444dafc5819971807682bb85f2316c10e4e64a735a95b05a0a5c1e4a66542702281deb364a6470f6bd0ea042818edb5a9b0396fb

diff --git a/dev-qt/qtwayland/files/qtwayland-5.15.2-QTBUG-90037-QTBUG-91264.patch b/dev-qt/qtwayland/files/qtwayland-5.15.2-QTBUG-90037-QTBUG-91264.patch
new file mode 100644
index 000000000000..8bffa3e08b3e
--- /dev/null
+++ b/dev-qt/qtwayland/files/qtwayland-5.15.2-QTBUG-90037-QTBUG-91264.patch
@@ -0,0 +1,131 @@
+From d7b34dbf072236cdfb3b64e5ad26d1ff29dfec5f Mon Sep 17 00:00:00 2001
+From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
+Date: Thu, 22 Apr 2021 08:42:33 +0200
+Subject: client: Gracefully handle shutdown and window hiding
+
+When a window is hidden or destroyed, the render thread may already
+be rendering. We need to properly read-lock the surface pointer
+when it is in use and exit when it becomes null.
+
+Note that there is also a potential crash in the Mesa GL driver
+where it keeps a proxy to the wl_surface, so if we delete this
+while we are still rendering, it can crash inside the driver.
+This is not addressed by this patch, and has not been reproduced
+on any other drivers so far.
+
+[ChangeLog][Client] Fixed a crash that could happen when hiding
+or closing windows while Qt Quick was actively rendering on
+a different thread.
+
+Pick-to: 6.0 6.1 5.15
+Fixes: QTBUG-91264
+Fixes: QTBUG-90037
+Task-number: QTBUG-92249
+Change-Id: I029b123b83c58740321e8b90a463ced748d8bcf4
+Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
+Reviewed-by: David Edmundson <davidedmundson@kde.org>
+(cherry picked from commit b19b0fbaf775e8b8eda1e03c265a5393d618c6c0)
+---
+ src/client/qwaylandwindow.cpp                   | 17 ++++++++++++++++-
+ src/client/qwaylandwindow_p.h                   |  2 +-
+ .../client/wayland-egl/qwaylandglcontext.cpp    |  1 -
+ 3 files changed, 17 insertions(+), 3 deletions(-)
+
+diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
+index 494911b3..0d849b57 100644
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -414,6 +414,7 @@ void QWaylandWindow::closePopups(QWaylandWindow *parent)
+ 
+ QPlatformScreen *QWaylandWindow::calculateScreenFromSurfaceEvents() const
+ {
++    QReadLocker lock(&mSurfaceLock);
+     if (mSurface) {
+         if (auto *screen = mSurface->oldestEnteredScreen())
+             return screen;
+@@ -552,6 +553,10 @@ void QWaylandWindow::sendRecursiveExposeEvent()
+ 
+ void QWaylandWindow::attach(QWaylandBuffer *buffer, int x, int y)
+ {
++    QReadLocker locker(&mSurfaceLock);
++    if (mSurface == nullptr)
++        return;
++
+     if (buffer) {
+         Q_ASSERT(!buffer->committed());
+         handleUpdate();
+@@ -571,6 +576,10 @@ void QWaylandWindow::attachOffset(QWaylandBuffer *buffer)
+ 
+ void QWaylandWindow::damage(const QRect &rect)
+ {
++    QReadLocker locker(&mSurfaceLock);
++    if (mSurface == nullptr)
++        return;
++
+     const int s = scale();
+     if (mDisplay->compositorVersion() >= 4)
+         mSurface->damage_buffer(s * rect.x(), s * rect.y(), s * rect.width(), s * rect.height());
+@@ -605,6 +614,8 @@ void QWaylandWindow::commit(QWaylandBuffer *buffer, const QRegion &damage)
+         qCDebug(lcWaylandBackingstore) << "Buffer already committed, ignoring.";
+         return;
+     }
++
++    QReadLocker locker(&mSurfaceLock);
+     if (!mSurface)
+         return;
+ 
+@@ -624,7 +635,9 @@ void QWaylandWindow::commit(QWaylandBuffer *buffer, const QRegion &damage)
+ 
+ void QWaylandWindow::commit()
+ {
+-    mSurface->commit();
++    QReadLocker locker(&mSurfaceLock);
++    if (mSurface != nullptr)
++        mSurface->commit();
+ }
+ 
+ const wl_callback_listener QWaylandWindow::callbackListener = {
+@@ -725,6 +738,7 @@ QPointF QWaylandWindow::mapFromWlSurface(const QPointF &surfacePosition) const
+ 
+ wl_surface *QWaylandWindow::wlSurface()
+ {
++    QReadLocker locker(&mSurfaceLock);
+     return mSurface ? mSurface->object() : nullptr;
+ }
+ 
+@@ -749,6 +763,7 @@ QWaylandScreen *QWaylandWindow::waylandScreen() const
+ 
+ void QWaylandWindow::handleContentOrientationChange(Qt::ScreenOrientation orientation)
+ {
++    QReadLocker locker(&mSurfaceLock);
+     if (mDisplay->compositorVersion() < 2)
+         return;
+ 
+diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
+index d45980a8..54ac67a9 100644
+--- a/src/client/qwaylandwindow_p.h
++++ b/src/client/qwaylandwindow_p.h
+@@ -288,7 +288,7 @@ private:
+ 
+     static QWaylandWindow *mMouseGrab;
+ 
+-    QReadWriteLock mSurfaceLock;
++    mutable QReadWriteLock mSurfaceLock;
+ 
+     friend class QWaylandSubSurface;
+ };
+diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+index 683fe123..8f12736d 100644
+--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
++++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+@@ -192,7 +192,6 @@ public:
+     }
+     void blit(QWaylandEglWindow *window)
+     {
+-        Q_ASSERT(window->wlSurface());
+         QOpenGLTextureCache *cache = QOpenGLTextureCache::cacheForContext(m_context->context());
+ 
+         QSize surfaceSize = window->surfaceSize();
+-- 
+2.35.0
+

diff --git a/dev-qt/qtwayland/files/qtwayland-5.15.2-fix-qmake-deps.patch b/dev-qt/qtwayland/files/qtwayland-5.15.2-fix-qmake-deps.patch
new file mode 100644
index 000000000000..e0c18228ed0f
--- /dev/null
+++ b/dev-qt/qtwayland/files/qtwayland-5.15.2-fix-qmake-deps.patch
@@ -0,0 +1,126 @@
+From 3b72261b8b06397a532a40e41103c6b7a44e3ab5 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Fri, 4 Feb 2022 11:07:36 +0100
+Subject: [PATCH] Use proper dependencies in compile tests
+
+Use the dependencies as found by the "libraries" section instead of relying
+on them being available in the default location (e.g. "-ldrm").
+
+Additionally, VK_USE_PLATFORM_WAYLAND_KHR requires <wayland-client.h>, so
+add the wayland-client dependency.
+
+This fixes those tests if e.g. wayland-client headers need to be found through
+pkgconfig.
+
+This part of the code changed completely in Qt 6, so this is a totally
+different patch and not a cherry-pick of 5fc2e1915c3a
+("CMake: Fix qtwayland feature detection").
+
+Fixes: QTBUG-100475
+---
+ src/client/configure.json     |  8 ++++----
+ src/compositor/configure.json | 34 +++++++++++++++++++++++++++++-----
+ 2 files changed, 33 insertions(+), 9 deletions(-)
+
+diff --git a/src/client/configure.json b/src/client/configure.json
+index 2f424580..29222357 100644
+--- a/src/client/configure.json
++++ b/src/client/configure.json
+@@ -149,8 +149,7 @@
+                     "#endif"
+                 ]
+             },
+-            "libs": "-ldrm",
+-            "use": "egl"
++            "use": "drm egl"
+         },
+         "vulkan-server-buffer": {
+             "label": "Vulkan Buffer Sharing",
+@@ -168,7 +167,8 @@
+                     "exportAllocInfo.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;",
+                     "return 0;"
+                 ]
+-            }
++            },
++            "use": "wayland-client"
+         },
+         "egl_1_5-wayland": {
+             "label": "EGL 1.5 with Wayland Platform",
+@@ -183,7 +183,7 @@
+                     "eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_EXT, (struct wl_display *)(nullptr), nullptr);"
+                 ]
+             },
+-            "use": "egl"
++            "use": "egl wayland-client"
+         }
+     },
+ 
+diff --git a/src/compositor/configure.json b/src/compositor/configure.json
+index bcfd5215..da95d07b 100644
+--- a/src/compositor/configure.json
++++ b/src/compositor/configure.json
+@@ -7,6 +7,31 @@
+     "testDir": "../../config.tests",
+ 
+     "libraries": {
++        "wayland-client": {
++            "label": "Wayland client library",
++            "headers": "wayland-version.h",
++            "test": {
++                "main": [
++                    "#if WAYLAND_VERSION_MAJOR < 1",
++                    "# error Wayland 1.8.0 or higher required",
++                    "#endif",
++                    "#if WAYLAND_VERSION_MAJOR == 1",
++                    "# if WAYLAND_VERSION_MINOR < 8",
++                    "#  error Wayland 1.8.0 or higher required",
++                    "# endif",
++                    "# if WAYLAND_VERSION_MINOR == 8",
++                    "#  if WAYLAND_VERSION_MICRO < 0",
++                    "#   error Wayland 1.8.0 or higher required",
++                    "#  endif",
++                    "# endif",
++                    "#endif"
++                 ]
++            },
++            "sources": [
++                { "type": "pkgConfig", "args": "wayland-client" },
++                "-lwayland-client"
++            ]
++        },
+         "wayland-server": {
+             "label": "wayland-server",
+             "headers": "wayland-version.h",
+@@ -151,8 +176,7 @@
+                     "#endif"
+                 ]
+             },
+-            "libs": "-ldrm",
+-            "use": "egl"
++            "use": "drm egl"
+         },
+         "dmabuf-client-buffer": {
+             "label": "Linux Client dma-buf Buffer Sharing",
+@@ -176,8 +200,7 @@
+                     "return 0;"
+                 ]
+             },
+-            "libs": "-ldrm",
+-            "use": "egl"
++            "use": "drm egl"
+         },
+         "vulkan-server-buffer": {
+             "label": "Vulkan Buffer Sharing",
+@@ -195,7 +218,8 @@
+                     "exportAllocInfo.handleTypes = VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR;",
+                     "return 0;"
+                 ]
+-            }
++            },
++            "use": "wayland-client"
+         }
+     },
+ 
+-- 
+GitLab
+

diff --git a/dev-qt/qtwayland/files/qtwayland-5.15.2-fixup-mutexes.patch b/dev-qt/qtwayland/files/qtwayland-5.15.2-fixup-mutexes.patch
new file mode 100644
index 000000000000..b861cebe60ac
--- /dev/null
+++ b/dev-qt/qtwayland/files/qtwayland-5.15.2-fixup-mutexes.patch
@@ -0,0 +1,87 @@
+From bf4335b1ea9b179076cbd7a1c2e8cfa9538b1dc1 Mon Sep 17 00:00:00 2001
+From: David Edmundson <davidedmundson@kde.org>
+Date: Thu, 3 Feb 2022 14:27:08 +0000
+Subject: [PATCH] Fix up mutexes for frame callbacks
+
+Everything related to frame callback timings is used by potentially 3
+threads. Access needs guarding.
+
+Change-Id: I9f22390c175d9f2f63d31b1ebf0cdc0b830be937
+---
+ src/client/qwaylandwindow.cpp | 14 +++++++++-----
+ src/client/qwaylandwindow_p.h | 10 +++++++---
+ 2 files changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
+index 7aee362a..72e0e601 100644
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -256,8 +256,12 @@ void QWaylandWindow::reset()
+         mFrameCallback = nullptr;
+     }
+ 
+-    mFrameCallbackElapsedTimer.invalidate();
+-    mWaitingForFrameCallback = false;
++    {
++        QMutexLocker locker(&mFrameSyncMutex);
++        mFrameCallbackElapsedTimer.invalidate();
++        mWaitingForFrameCallback = false;
++    }
++
+     mFrameCallbackTimedOut = false;
+ 
+     mMask = QRegion();
+@@ -1142,6 +1146,7 @@ QVariant QWaylandWindow::property(const QString &name, const QVariant &defaultVa
+ 
+ void QWaylandWindow::timerEvent(QTimerEvent *event)
+ {
++    QMutexLocker locker(&mFrameSyncMutex);
+     if (event->timerId() != mFrameCallbackCheckIntervalTimerId)
+         return;
+ 
+@@ -1200,15 +1205,14 @@ void QWaylandWindow::handleUpdate()
+ {
+     qCDebug(lcWaylandBackingstore) << "handleUpdate" << QThread::currentThread();
+ 
+-    if (mWaitingForFrameCallback)
+-        return;
+-
+     // TODO: Should sync subsurfaces avoid requesting frame callbacks?
+     QReadLocker lock(&mSurfaceLock);
+     if (!mSurface)
+         return;
+ 
+     QMutexLocker locker(&mFrameSyncMutex);
++    if (mWaitingForFrameCallback)
++        return;
+ 
+     struct ::wl_surface *wrappedSurface = reinterpret_cast<struct ::wl_surface *>(wl_proxy_create_wrapper(mSurface->object()));
+     wl_proxy_set_queue(reinterpret_cast<wl_proxy *>(wrappedSurface), mDisplay->frameEventQueue());
+diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
+index 3ff68ccb..025d7917 100644
+--- a/src/client/qwaylandwindow_p.h
++++ b/src/client/qwaylandwindow_p.h
+@@ -226,13 +226,17 @@ protected:
+     Qt::MouseButtons mMousePressedInContentArea = Qt::NoButton;
+ 
+     WId mWindowId;
++
++    // The following are used by the main thread the render thread and the event frame thread
++    // Access should be guarded by mFrameSyncMutex
++    QMutex mFrameSyncMutex;
++    QWaitCondition mFrameSyncWait;
+     bool mWaitingForFrameCallback = false;
+-    bool mFrameCallbackTimedOut = false; // Whether the frame callback has timed out
+     int mFrameCallbackCheckIntervalTimerId = -1;
+     QElapsedTimer mFrameCallbackElapsedTimer;
++
++    bool mFrameCallbackTimedOut = false; // Whether the frame callback has timed out
+     struct ::wl_callback *mFrameCallback = nullptr;
+-    QMutex mFrameSyncMutex;
+-    QWaitCondition mFrameSyncWait;
+ 
+     // True when we have called deliverRequestUpdate, but the client has not yet attached a new buffer
+     bool mWaitingForUpdate = false;
+-- 
+GitLab
+

diff --git a/dev-qt/qtwayland/files/qtwayland-5.15.2-guard-mResizeDirty.patch b/dev-qt/qtwayland/files/qtwayland-5.15.2-guard-mResizeDirty.patch
new file mode 100644
index 000000000000..c2e377cff054
--- /dev/null
+++ b/dev-qt/qtwayland/files/qtwayland-5.15.2-guard-mResizeDirty.patch
@@ -0,0 +1,37 @@
+From 2e2042aa18efd1389a140a5d0028d8359bd455a7 Mon Sep 17 00:00:00 2001
+From: David Edmundson <davidedmundson@kde.org>
+Date: Thu, 3 Feb 2022 19:42:33 +0000
+Subject: [PATCH] Guard mResizeDirty by the correctMutex
+
+mResizeDirty is used in the GUI thread in setCanResize which can be
+called from the GUI thread. It is queried and set whilst the resizeLock
+is held. We need to guard our usage.
+
+Change-Id: I5f8dcf8aa2cb2c4bb6274103df1da9e3e268605a
+---
+ src/client/qwaylandwindow.cpp | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
+index 949374b1..7aee362a 100644
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -357,11 +357,12 @@ void QWaylandWindow::setGeometry(const QRect &rect)
+         if (mWindowDecoration)
+             mWindowDecoration->update();
+ 
+-        if (mResizeAfterSwap && windowType() == Egl && mSentInitialResize)
++        if (mResizeAfterSwap && windowType() == Egl && mSentInitialResize) {
++            QMutexLocker lock(&mResizeLock);
+             mResizeDirty = true;
+-        else
++        } else {
+             QWindowSystemInterface::handleGeometryChange(window(), geometry());
+-
++        }
+         mSentInitialResize = true;
+     }
+     QRect exposeGeometry(QPoint(), geometry().size());
+-- 
+GitLab
+

diff --git a/dev-qt/qtwayland/files/qtwayland-5.15.2-remove-mWaitingForUpdateDelivery.patch b/dev-qt/qtwayland/files/qtwayland-5.15.2-remove-mWaitingForUpdateDelivery.patch
new file mode 100644
index 000000000000..a76b15d39cac
--- /dev/null
+++ b/dev-qt/qtwayland/files/qtwayland-5.15.2-remove-mWaitingForUpdateDelivery.patch
@@ -0,0 +1,79 @@
+From 214f7ab9d3384a4123f14d9f6cd0205cf0aaa794 Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Tue, 1 Feb 2022 13:05:36 +0200
+Subject: [PATCH] Client: Remove mWaitingForUpdateDelivery
+
+Currently, mWaitingForUpdateDelivery is shared between the main thread
+(doHandleFrameCallback()) and the frame callback event thread
+(handleFrameCallback()), however the access to it is not synchronized
+between both threads. On the other hand, QWaylandWindow
+already ensures not to create a frame callback if there's already one
+pending.
+
+This change removes mWaitingForUpdateDelivery flag because it should be
+already covered by mWaitingForFrameCallback and to remove unsynchronized
+shared state between threads.
+
+Change-Id: I0e5a25d18d1e66c4d7683e7e972330c4d7cbbf38
+Reviewed-by: David Edmundson <davidedmundson@kde.org>
+(cherry picked from commit feb1a5c207c13d0bf87c0d8ad039279dbf8cee9e)
+---
+ src/client/qwaylandwindow.cpp | 29 ++++++++++++-----------------
+ src/client/qwaylandwindow_p.h |  1 -
+ 2 files changed, 12 insertions(+), 18 deletions(-)
+
+diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
+index 4c5711a0..949374b1 100644
+--- a/src/client/qwaylandwindow.cpp
++++ b/src/client/qwaylandwindow.cpp
+@@ -648,23 +648,18 @@ void QWaylandWindow::handleFrameCallback()
+     mFrameCallbackElapsedTimer.invalidate();
+ 
+     // The rest can wait until we can run it on the correct thread
+-    if (!mWaitingForUpdateDelivery) {
+-        auto doHandleExpose = [this]() {
+-            bool wasExposed = isExposed();
+-            mFrameCallbackTimedOut = false;
+-            if (!wasExposed && isExposed()) // Did setting mFrameCallbackTimedOut make the window exposed?
+-                sendExposeEvent(QRect(QPoint(), geometry().size()));
+-            if (wasExposed && hasPendingUpdateRequest())
+-                deliverUpdateRequest();
+-
+-            mWaitingForUpdateDelivery = false;
+-        };
+-
+-        // Queued connection, to make sure we don't call handleUpdate() from inside waitForFrameSync()
+-        // in the single-threaded case.
+-        mWaitingForUpdateDelivery = true;
+-        QMetaObject::invokeMethod(this, doHandleExpose, Qt::QueuedConnection);
+-    }
++    auto doHandleExpose = [this]() {
++        bool wasExposed = isExposed();
++        mFrameCallbackTimedOut = false;
++        if (!wasExposed && isExposed()) // Did setting mFrameCallbackTimedOut make the window exposed?
++            sendExposeEvent(QRect(QPoint(), geometry().size()));
++        if (wasExposed && hasPendingUpdateRequest())
++            deliverUpdateRequest();
++    };
++
++    // Queued connection, to make sure we don't call handleUpdate() from inside waitForFrameSync()
++    // in the single-threaded case.
++    QMetaObject::invokeMethod(this, doHandleExpose, Qt::QueuedConnection);
+ 
+     mFrameSyncWait.notify_all();
+ }
+diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
+index d45980a8..3ff68ccb 100644
+--- a/src/client/qwaylandwindow_p.h
++++ b/src/client/qwaylandwindow_p.h
+@@ -228,7 +228,6 @@ protected:
+     WId mWindowId;
+     bool mWaitingForFrameCallback = false;
+     bool mFrameCallbackTimedOut = false; // Whether the frame callback has timed out
+-    bool mWaitingForUpdateDelivery = false;
+     int mFrameCallbackCheckIntervalTimerId = -1;
+     QElapsedTimer mFrameCallbackElapsedTimer;
+     struct ::wl_callback *mFrameCallback = nullptr;
+-- 
+GitLab
+

diff --git a/dev-qt/qtwayland/qtwayland-5.15.2-r19.ebuild b/dev-qt/qtwayland/qtwayland-5.15.2-r19.ebuild
new file mode 100644
index 000000000000..2761a297bc7b
--- /dev/null
+++ b/dev-qt/qtwayland/qtwayland-5.15.2-r19.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KDE_ORG_COMMIT=ce2caf493a1343fbd9f8e4c85baf6a61c057f242
+inherit qt5-build
+
+DESCRIPTION="Wayland platform plugin for Qt"
+
+if [[ ${QT5_BUILD_TYPE} == release ]]; then
+	KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+SLOT=5/${QT5_PV} # bug 815646
+IUSE="vulkan X"
+
+DEPEND="
+	dev-libs/wayland
+	=dev-qt/qtcore-${QT5_PV}*:5=
+	=dev-qt/qtdeclarative-${QT5_PV}*:5=
+	=dev-qt/qtgui-${QT5_PV}*:5=[egl,libinput,vulkan=,X?]
+	media-libs/libglvnd
+	vulkan? ( dev-util/vulkan-headers )
+	X? (
+		=dev-qt/qtgui-${QT5_PV}*[-gles2-only]
+		x11-libs/libX11
+		x11-libs/libXcomposite
+	)
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	dev-util/wayland-scanner
+"
+
+PATCHES=(
+	"${FILESDIR}/${P}-QTBUG-90037-QTBUG-91264.patch"
+	"${FILESDIR}/${P}-fix-qmake-deps.patch"
+	"${FILESDIR}/${P}-remove-mWaitingForUpdateDelivery.patch"
+	"${FILESDIR}/${P}-guard-mResizeDirty.patch"
+	"${FILESDIR}/${P}-fixup-mutexes.patch"
+)
+
+src_configure() {
+	local myqmakeargs=(
+		--
+		$(qt_use vulkan feature-wayland-vulkan-server-buffer)
+		$(qt_use X feature-xcomposite-egl)
+		$(qt_use X feature-xcomposite-glx)
+	)
+	qt5-build_src_configure
+}


             reply	other threads:[~2022-02-08 19:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 19:58 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-07-12  4:34 [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtwayland/files/, dev-qt/qtwayland/ Ionen Wolkens
2024-07-09 14:35 Ionen Wolkens
2024-04-19  7:55 Ionen Wolkens
2024-02-14 12:24 Ionen Wolkens
2023-09-19 12:11 Andreas Sturmlechner
2023-08-15 19:57 Andreas Sturmlechner
2023-07-14  7:29 Sam James
2023-04-13 21:45 Andreas Sturmlechner
2022-04-15  6:08 Sam James
2022-02-15 10:23 Andreas Sturmlechner
2019-11-25  1:35 Andreas Sturmlechner
2019-11-20 21:21 Andreas Sturmlechner
2019-07-20  8:52 Andreas Sturmlechner
2018-02-07 14:17 Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1644350309.dd788798d12a04fb9c052c5df2d111a052e07ab0.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox