From 19017412f64b7acac89158958d4bc84f303e342e Mon Sep 17 00:00:00 2001 From: svan71 <48870638+svan71@users.noreply.github.com> Date: Thu, 9 Jul 2026 16:56:05 -0400 Subject: [PATCH] fix: set WA_TranslucentBackground before winId() in PluginItem winId() forces creation of the underlying native window. Qt::WA_Translucent- Background selects the surface format (an ARGB visual) and therefore has to be set before that window exists; setting it afterwards leaves the already-created surface opaque. The result on Qt 6.11 is that every tray plugin paints its background rectangle at all times instead of only on hover, tinted by whatever shows through from the desktop behind the dock. Latent on Qt 6.8, which is what deepin 25 ships -- as already anticipated by the comment added in #383. Verified by A/B on Arch Linux with Qt 6.11.1, X11, swapping only this binary. --- src/loader/pluginitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/loader/pluginitem.cpp b/src/loader/pluginitem.cpp index 7514ce59a..53b3a2707 100644 --- a/src/loader/pluginitem.cpp +++ b/src/loader/pluginitem.cpp @@ -291,8 +291,8 @@ void PluginItem::handleShutDownMenu(const QString &menuId) void PluginItem::init() { - winId(); setAttribute(Qt::WA_TranslucentBackground); + winId(); auto hLayout = new QHBoxLayout; hLayout->addWidget(centralWidget());