dev-qt/qtwayland: backport 6.9 fix for missing applet popups

Albeit 6.9.0 remains masked and 6.8.3 is not affected.

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2025-04-17 00:07:18 -04:00
parent 0690177c27
commit 690736d751
2 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,60 @@
Backport recommended by KDE[1].
[1] https://invent.kde.org/qt/qt/qtwayland/-/commit/e4556c59f0c8250da7c16759432b2ac0a5ac9d9f
[2] https://mail.kde.org/pipermail/distributions/2025-April/001575.html
From e4556c59f0c8250da7c16759432b2ac0a5ac9d9f Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Mon, 31 Mar 2025 11:40:12 +0300
Subject: [PATCH] Client: Reset mFrameCallbackTimedOut when showing a window
When a window is hidden, the corresponding expose event is sent
asynchronously. So, a buffer (and a frame callback) can be attached
after the window is hidden.
QWaylandWindow::initWindow() handles that case by attaching a nil buffer
to the surface, but it skips resetting the frame callback things.
If mFrameCallbackTimedOut is not reset, then the window can get stuck
in the unexposed state and not show up after the second setVisible(true).
This change makes the initWindow() function also reset frame callback
data. It fixes some windows not showing up after remapping them.
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -107,4 +107,5 @@
mSurface->attach(nullptr, 0, 0);
mSurface->commit();
+ resetFrameCallback();
if (window()->type() == Qt::Desktop)
@@ -326,4 +327,13 @@
delete std::exchange(mSubSurfaceWindow, nullptr);
emit surfaceRoleDestroyed();
+
+ resetFrameCallback();
+ mInFrameRender = false;
+ mWaitingToApplyConfigure = false;
+ mExposed = false;
+}
+
+void QWaylandWindow::resetFrameCallback()
+{
{
QMutexLocker lock(&mFrameSyncMutex);
@@ -339,8 +349,5 @@
mFrameCallbackCheckIntervalTimerId = -1;
}
- mInFrameRender = false;
mFrameCallbackTimedOut = false;
- mWaitingToApplyConfigure = false;
- mExposed = false;
}
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -352,4 +352,5 @@
bool shouldCreateSubSurface() const;
void resetSurfaceRole();
+ void resetFrameCallback();
QPlatformScreen *calculateScreenFromSurfaceEvents() const;
void setOpaqueArea(const QRegion &opaqueArea);

View File

@@ -47,6 +47,10 @@ CMAKE_SKIP_TESTS=(
tst_scaling
)
PATCHES=(
"${FILESDIR}"/${P}-reset-mframe.patch
)
src_configure() {
local mycmakeargs=(
$(cmake_use_find_package compositor Qt6Quick)