https://bugs.kde.org/show_bug.cgi?id=449163
madc...@atlas.cz changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |madc...@atlas.cz --- Comment #25 from madc...@atlas.cz --- Can any of you try to apply this patch to Qt 5.15 and check if the issue persists? It seems to fix the problem for me but I can just be lucky. FYI, the patch is the same thing mentioned in #17 backported to apply to kde/5.15 branch of qtwayland diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 4c5711a0..76a448e6 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp @@ -648,27 +648,20 @@ 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); - } + QMetaObject::invokeMethod(this, &QWaylandWindow::doHandleFrameCallback, Qt::QueuedConnection); mFrameSyncWait.notify_all(); } +void QWaylandWindow::doHandleFrameCallback() { + bool wasExposed = isExposed(); + mFrameCallbackTimedOut = false; + if (!wasExposed && isExposed()) // Did setting mFrameCallbackTimedOut make the window exposed? + sendExposeEvent(QRect(QPoint(), geometry().size())); + if (wasExposed && hasPendingUpdateRequest()) + deliverUpdateRequest(); +} + bool QWaylandWindow::waitForFrameSync(int timeout) { QMutexLocker locker(&mFrameSyncMutex); diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h index d45980a8..f31d3fcb 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; @@ -285,6 +284,7 @@ private: static const wl_callback_listener callbackListener; void handleFrameCallback(); + void doHandleFrameCallback(); static QWaylandWindow *mMouseGrab; -- 2.35.1 -- You are receiving this mail because: You are watching all bug changes.