[neon/kde/kio/Neon/release] debian/patches: add patch recommended by nate
Jonathan Riddell
null at kde.org
Mon Jul 22 13:53:53 BST 2024
Git commit cd3759ad04b85d6d678e61dda16a3d3dacf8a529 by Jonathan Riddell.
Committed on 22/07/2024 at 12:53.
Pushed by jriddell into branch 'Neon/release'.
add patch recommended by nate
A +40 -0 debian/patches/remove-parent-from-dropmenu.diff
M +1 -0 debian/patches/series
https://invent.kde.org/neon/kde/kio/-/commit/cd3759ad04b85d6d678e61dda16a3d3dacf8a529
diff --git a/debian/patches/remove-parent-from-dropmenu.diff b/debian/patches/remove-parent-from-dropmenu.diff
new file mode 100644
index 0000000..3692088
--- /dev/null
+++ b/debian/patches/remove-parent-from-dropmenu.diff
@@ -0,0 +1,40 @@
+commit e0ea91afdf0dccef7e3afbf23a159bf5a8d6b249
+Author: Vlad Zahorodnii <vlad.zahorodnii at kde.org>
+Date: Mon Jul 15 09:45:20 2024 +0300
+
+ 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
+
+diff --git a/src/widgets/dropjob.cpp b/src/widgets/dropjob.cpp
+index e11e762bd..f4a23f568 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);
diff --git a/debian/patches/series b/debian/patches/series
index 00130ac..4552e03 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ wait_for_a_bit_longer
Disable-flaky-test.patch
Disable-baloo-dependant-tests.patch
+remove-parent-from-dropmenu.diff
More information about the Neon-commits
mailing list