Package: kio-extras
Version: 4:24.12.2-2
Severity: important
Tags: patch upstream fixed-upstream X-Debbugs-Cc: jrub...@gmail.com
Dear Maintainer,
Upstream kio-extras had a bug 500173 Spurious windows while generating
HTML preview in Wayland [1] where when viewing HTML documents in a
Wayland session, using Dolphin for example, kioworker would generate
distracting Wayland windows from kioworker and use them to build
thumbnails, removing focus from the user until thumbnails were generated.
This has been fixed upstream, but is not yet in a tagged release. The
most recent upstream tagged release, v24.12.3, patches out the initial
fix for this bug found in MR 412 [2] as it introduced a regression where
icons generated would no longer respect the current KDE theme, however
this regression was fixed in MR 415 [3] which was merged.
As it is not released yet I have included a backport to fix the issue in
the meantime. This backport includes the content of the referenced MRs
412 and 415.
Best Regards,
Jonathan Rubenstein
[1]: https://bugs.kde.org/show_bug.cgi?id=500173
[2]: https://invent.kde.org/network/kio-extras/-/merge_requests/412
[3]: https://invent.kde.org/network/kio-extras/-/merge_requests/415
-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.12.19-amd64 (SMP w/12 CPU threads; PREEMPT)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8),
LANGUAGE=fi:en_US:en_GB
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages kio-extras depends on:
ii kio-extras-data 4:24.12.2-2
ii kio6 6.11.0-1+b1
ii libappimage1.0abi1t64 1.0.4-5-4
ii libc6 2.41-6
ii libgcc-s1 14.2.0-19
ii libimobiledevice-1.0-6 1.3.0+git20240701-4+b1
ii libkdsoap-qt6-2 2.2.0+dfsg-3
ii libkdsoapwsdiscoveryclient0 0.4.0-2
ii libkexiv2qt6-0 24.12.3-1
ii libkf6archive6 6.11.0-1
ii libkf6configcore6 6.11.0-1
ii libkf6configgui6 6.11.0-1
ii libkf6coreaddons6 6.11.0-1
ii libkf6dbusaddons6 6.11.0-1+b1
ii libkf6dnssd6 6.11.0-1
ii libkf6i18n6 6.11.0-1
ii libkf6kcmutils6 6.11.0-1
ii libkf6kcmutilscore6 6.11.0-1
ii libkf6kiocore6 6.11.0-1+b1
ii libkf6kiofilewidgets6 6.11.0-1+b1
ii libkf6kiogui6 6.11.0-1+b1
ii libkf6kiowidgets6 6.11.0-1+b1
ii libkf6service-bin 6.11.0-1
ii libkf6service6 6.11.0-1
ii libkf6solid6 6.11.0-1
ii libkf6syntaxhighlighting6 6.11.0-1
ii libkf6textwidgets6 6.11.0-1
ii libkf6widgetsaddons6 6.11.0-1
ii libmtp9t64 1.1.22-1
ii libopenexr-3-1-30 3.1.13-2
ii libphonon4qt6-4t64 4:4.12.0-4
ii libplasmaactivities6 6.3.2-1
ii libplasmaactivitiesstats1 6.3.2-1
ii libplist-2.0-4 2.6.0-2+b1
ii libqt6core5compat6 6.8.2-3+b1
ii libqt6core6t64 6.8.2+dfsg-5+b1
ii libqt6dbus6 6.8.2+dfsg-5+b1
ii libqt6gui6 6.8.2+dfsg-5+b1
ii libqt6network6 6.8.2+dfsg-5+b1
ii libqt6sql6 6.8.2+dfsg-5+b1
ii libqt6svg6 6.8.2-3
ii libqt6widgets6 6.8.2+dfsg-5+b1
ii libsmbclient0 2:4.22.0+dfsg-1+b1
ii libssh-4 0.11.1-1
ii libstdc++6 14.2.0-19
ii libtag2 2.0.2-2
ii libxcursor1 1:1.2.3-1
ii phonon4qt6 4:4.12.0-4
Versions of packages kio-extras recommends:
ii libkf6kcmutils-bin 6.11.0-1
ii systemsettings 4:6.3.2-1
kio-extras suggests no packages.
-- no debconf information
Description: Backport upstream fixes for BUG 500173
* Backport fixes for KDE bug Spurious windows while generating HTML preview in
Wayland
* closes: #(add debian bug here)
Author: Jonathan Rubenstein <jrub...@gmail.com>
Bug-Debian: https://bugs.debian.org/(add debian bug here)
Origin: backport,
https://invent.kde.org/network/kio-extras/-/merge_requests/412 &
https://invent.kde.org/network/kio-extras/-/merge_requests/415
Bug: https://bugs.kde.org/show_bug.cgi?id=500173
Forwarded: not-needed
Applied-Upstream: master,
https://invent.kde.org/network/kio-extras/-/commit/e11dfd86bd075afc7ff5c5eec70bc5d2377c4168
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2025-03-28
--- kio-extras-24.12.2.orig/thumbnail/CMakeLists.txt
+++ kio-extras-24.12.2/thumbnail/CMakeLists.txt
@@ -84,10 +84,13 @@ ecm_qt_declare_logging_category(kio_thum
)
target_link_libraries(kio_thumbnail
- KF6::CoreAddons
- KF6::KIOCore
- KF6::KIOWidgets
- KF6::I18n
+ PUBLIC
+ KF6::CoreAddons
+ KF6::KIOCore
+ KF6::KIOWidgets
+ KF6::I18n
+ PRIVATE
+ Qt6::GuiPrivate
)
install(TARGETS kio_thumbnail DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf6/kio)
--- kio-extras-24.12.2.orig/thumbnail/thumbnail.cpp
+++ kio-extras-24.12.2/thumbnail/thumbnail.cpp
@@ -51,6 +51,9 @@
#include "imagefilter.h"
+#include <private/qguiapplication_p.h> //
QGuiApplicationPrivate::platformTheme()
+#include <qpa/qplatformtheme.h>
+
// Recognized metadata entries:
// mimeType - the mime type of the file, used for the overlay icon if any
// width - maximum width for the thumbnail
@@ -101,6 +104,22 @@ extern "C" Q_DECL_EXPORT int kdemain(int
// need QGuiApplication
qunsetenv("SESSION_MANAGER");
+ // Some plugins may cause unwanted windows to appear
+ // (e.g. Webarchiver, see https://bugs.kde.org/show_bug.cgi?id=500173).
+ // This will not let any plugin to create auxilliary windows on the screen
+ // while generating thumbnails.
+ // Retrieve theme name from the default platform...
+ QString themeName;
+ {
+ QGuiApplication aux(argc, argv);
+ if (auto platformTheme = QGuiApplicationPrivate::platformTheme()) {
+ themeName = platformTheme->name();
+ }
+ }
+ // ...and force using offscreen platform with the default platform's theme
+ qputenv("QT_QPA_PLATFORM", "offscreen");
+ qputenv("QT_QPA_PLATFORMTHEME", themeName.toUtf8());
+
// Some thumbnail plugins use QWidget classes for the rendering,
// so use QApplication here, not just QGuiApplication
QApplication app(argc, argv);