diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2024-07-16 18:25:33 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2024-07-16 18:31:50 +0200 |
commit | b328c5fab384455b07366963061529a15c5c7e61 (patch) | |
tree | 97c1adb998316e7ec24e01fb065ba40c4a188e49 /kde-frameworks/kio | |
parent | kde-plasma/xdg-desktop-portal-kde: drop 6.1.2 (diff) | |
download | gentoo-b328c5fab384455b07366963061529a15c5c7e61.tar.gz gentoo-b328c5fab384455b07366963061529a15c5c7e61.tar.bz2 gentoo-b328c5fab384455b07366963061529a15c5c7e61.zip |
kde-frameworks/kio: Remove parent for DropMenu
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=490183
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks/kio')
-rw-r--r-- | kde-frameworks/kio/files/kio-6.4.0-remove-parent-for-DropMenu.patch | 45 | ||||
-rw-r--r-- | kde-frameworks/kio/kio-6.4.0-r1.ebuild | 94 |
2 files changed, 139 insertions, 0 deletions
diff --git a/kde-frameworks/kio/files/kio-6.4.0-remove-parent-for-DropMenu.patch b/kde-frameworks/kio/files/kio-6.4.0-remove-parent-for-DropMenu.patch new file mode 100644 index 000000000000..596806804902 --- /dev/null +++ b/kde-frameworks/kio/files/kio-6.4.0-remove-parent-for-DropMenu.patch @@ -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 + diff --git a/kde-frameworks/kio/kio-6.4.0-r1.ebuild b/kde-frameworks/kio/kio-6.4.0-r1.ebuild new file mode 100644 index 000000000000..556fbe131d4d --- /dev/null +++ b/kde-frameworks/kio/kio-6.4.0-r1.ebuild @@ -0,0 +1,94 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +ECM_DESIGNERPLUGIN="true" +ECM_HANDBOOK="optional" +ECM_HANDBOOK_DIR="docs" +ECM_TEST="forceoptional" +PVCUT=$(ver_cut 1-2) +QTMIN=6.6.2 +inherit ecm frameworks.kde.org xdg-utils + +DESCRIPTION="Framework providing transparent file and data management" + +LICENSE="LGPL-2+" +KEYWORDS="~amd64 ~arm64 ~riscv ~x86" +IUSE="acl +kwallet wayland X" + +# tests hang +RESTRICT="test" + +# slot op: Uses Qt6::GuiPrivate for qtx11extras_p.h +COMMON_DEPEND=" + >=dev-qt/qtbase-${QTMIN}:6[dbus,gui,network,ssl,widgets] + >=dev-qt/qt5compat-${QTMIN}:6 + >=dev-qt/qtdeclarative-${QTMIN}:6 + =kde-frameworks/kauth-${PVCUT}*:6 + =kde-frameworks/kbookmarks-${PVCUT}*:6 + =kde-frameworks/kcodecs-${PVCUT}*:6 + =kde-frameworks/kcolorscheme-${PVCUT}*:6 + =kde-frameworks/kcompletion-${PVCUT}*:6 + =kde-frameworks/kconfig-${PVCUT}*:6 + =kde-frameworks/kconfigwidgets-${PVCUT}*:6 + =kde-frameworks/kcoreaddons-${PVCUT}*:6 + =kde-frameworks/kcrash-${PVCUT}*:6 + =kde-frameworks/kdbusaddons-${PVCUT}*:6 + =kde-frameworks/kguiaddons-${PVCUT}*:6 + =kde-frameworks/ki18n-${PVCUT}*:6 + =kde-frameworks/kiconthemes-${PVCUT}*:6 + =kde-frameworks/kitemviews-${PVCUT}*:6 + =kde-frameworks/kjobwidgets-${PVCUT}*:6 + =kde-frameworks/knotifications-${PVCUT}*:6 + =kde-frameworks/kservice-${PVCUT}*:6 + =kde-frameworks/ktextwidgets-${PVCUT}*:6 + =kde-frameworks/kwidgetsaddons-${PVCUT}*:6 + =kde-frameworks/kwindowsystem-${PVCUT}*:6[wayland?,X?] + =kde-frameworks/kxmlgui-${PVCUT}*:6 + =kde-frameworks/solid-${PVCUT}*:6 + sys-power/switcheroo-control + acl? ( + sys-apps/attr + virtual/acl + ) + handbook? ( + dev-libs/libxml2 + dev-libs/libxslt + =kde-frameworks/karchive-${PVCUT}*:6 + =kde-frameworks/kdoctools-${PVCUT}*:6 + ) + kwallet? ( =kde-frameworks/kwallet-${PVCUT}*:6 ) + X? ( >=dev-qt/qtbase-${QTMIN}:6=[gui] ) +" +DEPEND="${COMMON_DEPEND} + >=dev-qt/qtbase-${QTMIN}:6[concurrent] +" +RDEPEND="${COMMON_DEPEND} + >=dev-qt/qtbase-${QTMIN}:6[libproxy] + sys-power/switcheroo-control +" +PDEPEND=">=kde-frameworks/kded-${PVCUT}:6" + +PATCHES=( "${FILESDIR}/${P}-remove-parent-for-DropMenu.patch" ) # KDE-bug 490183 + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package acl ACL) + $(cmake_use_find_package kwallet KF6Wallet) + -DWITH_WAYLAND=$(usex wayland) + -DWITH_X11=$(usex X) + ) + + ecm_src_configure +} + +pkg_postinst() { + ecm_pkg_postinst + xdg_desktop_database_update +} + +pkg_postrm() { + ecm_pkg_postrm + xdg_desktop_database_update +} |