community/kio: backport patch to fix Dolphin and Konqueror

Upstream bug report https://bugs.kde.org/show_bug.cgi?id=490183
This commit is contained in:
Bart Ribbers 2024-07-17 08:46:19 +02:00
parent ec206f2cca
commit 767b38095c
2 changed files with 60 additions and 4 deletions

View File

@ -0,0 +1,45 @@
From e0ea91afdf0dccef7e3afbf23a159bf5a8d6b249 Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Mon, 15 Jul 2024 09:45:20 +0300
Subject: [PATCH] Remove parent for DropMenu
QWidget::winId() will force creating window handles for all its ancestor
widgets unless the Qt::WA_DontCreateNativeAncestors flag is set.
For example, on wayland, this would result in creating sub-surfaces, and
depending on the client, it's likely that there are going to be issues with
painting.
On the other hand, since the DropJob takes care of setting the transient
parent for the DropMenu, the parent can be simply omitted.
BUG: 490183
---
src/widgets/dropjob.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/widgets/dropjob.cpp b/src/widgets/dropjob.cpp
index e11e762bd0..f4a23f5688 100644
--- a/src/widgets/dropjob.cpp
+++ b/src/widgets/dropjob.cpp
@@ -520,8 +520,7 @@ void DropJobPrivate::slotDropActionDetermined(int error)
// There was an error, handle it
if (error == KIO::ERR_UNKNOWN) {
- auto *window = KJobWidgets::window(q);
- KIO::DropMenu *menu = new KIO::DropMenu(window);
+ KIO::DropMenu *menu = new KIO::DropMenu();
QObject::connect(menu, &QMenu::aboutToHide, menu, &QObject::deleteLater);
// If the user clicks outside the menu, it will be destroyed without emitting the triggered signal.
@@ -541,6 +540,7 @@ void DropJobPrivate::slotDropActionDetermined(int error)
menu->windowHandle()->setTransientParent(transientParent);
}
}
+ auto *window = KJobWidgets::window(q);
menu->popup(window ? window->mapToGlobal(m_relativePos) : QCursor::pos());
}
m_menus.insert(menu);
--
GitLab

View File

@ -5,7 +5,7 @@
# group=kde-frameworks
pkgname=kio
pkgver=6.4.0
pkgrel=0
pkgrel=1
pkgdesc="Resource and network access abstraction"
# armhf blocked by extra-cmake-modules
arch="all !armhf"
@ -36,16 +36,26 @@ depends_dev="
makedepends="$depends_dev
doxygen
extra-cmake-modules
kdoctools-dev
libxml2-dev
libxslt-dev
qt6-qttools-dev
samurai
"
checkdepends="xvfb-run"
subpackages="$pkgname-dev $pkgname-dbg $pkgname-doc $pkgname-lang $pkgname-kwallet"
subpackages="$pkgname-dev $pkgname-dbg $pkgname-lang $pkgname-kwallet"
# kdoctools is currently broken on 32-bit architectures
case "$CARCH" in
x86|armv7) ;;
*)
makedepends="$makedepends kdoctools-dev"
subpackages="$subpackages $pkgname-doc"
;;
esac
_repo_url="https://invent.kde.org/frameworks/kio.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kio-$pkgver.tar.xz"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kio-$pkgver.tar.xz
0001-Remove-parent-for-DropMenu.patch
"
# Checks fails due to requiring physical devices not normally available and test 14 hangs
options="!check"
@ -74,4 +84,5 @@ kwallet() {
sha512sums="
9068ea2f400848ad26bfe4b56d9489f897c02a5410d47444b5f44118f7491cd7914eee83dee095f301e910c546a60d5d2a121aea617e87fbc9c971c3ac5e3e24 kio-6.4.0.tar.xz
24b6e82727817a5ab7fae9f5dc4dd73534f28996f38538efaab4b13a43379c51c2285bb0013f4108caa09b6c1444e19dad3e6415bc476856608c4c829569eb66 0001-Remove-parent-for-DropMenu.patch
"