[neon/qt/qtquickcontrols2/Neon/unstable] debian: Add one more patch from KDE’s collection: fix the popup position of a Menu.

Dmitry Shachnev null at kde.org
Mon Apr 29 17:44:21 BST 2024


Git commit 2220099e885ec18183fee4a29c75181d3d56bc05 by Dmitry Shachnev.
Committed on 06/01/2023 at 07:44.
Pushed by jriddell into branch 'Neon/unstable'.

Add one more patch from KDE’s collection: fix the popup position of a Menu.

M  +1    -0    debian/changelog
A  +40   -0    debian/patches/0008-Fix-the-popup-position-of-a-Menu.patch
M  +1    -0    debian/patches/series

https://invent.kde.org/neon/qt/qtquickcontrols2/-/commit/2220099e885ec18183fee4a29c75181d3d56bc05

diff --git a/debian/changelog b/debian/changelog
index e595b37..f63be5a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ qtquickcontrols2-opensource-src (5.15.8+dfsg-1) UNRELEASED; urgency=medium
   * New upstream release.
   * Bump Qt build-dependencies to 5.15.8.
   * Refresh 0001-Unset-mouseGrabberPopup-if-it-s-removed-from-childre.patch.
+  * Add one more patch from KDE’s collection: fix the popup position of a Menu.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Fri, 06 Jan 2023 11:09:57 +0400
 
diff --git a/debian/patches/0008-Fix-the-popup-position-of-a-Menu.patch b/debian/patches/0008-Fix-the-popup-position-of-a-Menu.patch
new file mode 100644
index 0000000..ac92481
--- /dev/null
+++ b/debian/patches/0008-Fix-the-popup-position-of-a-Menu.patch
@@ -0,0 +1,40 @@
+From 56ce8233382a091a8476c831edd416b5f704ae4f Mon Sep 17 00:00:00 2001
+From: Inho Lee <inho.lee at qt.io>
+Date: Mon, 22 Aug 2022 21:05:00 +0800
+Subject: [PATCH] Fix the popup position of a Menu
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+QPA code should operate in native coord.
+Treat QWidgetPlatformMenu::showPopup's input as native coord.
+
+Fixes: QTBUG-94619
+Fixes: QTBUG-94783
+Change-Id: Iaa030c96d84e4a588e625fe191e4324f70be961f
+Reviewed-by: Morten Johan Sørvig <morten.sorvig at qt.io>
+(cherry picked from commit f8cf17166c9af147f0b8fea72f5b4a8a6098a5d7 in
+qtdeclarative)
+---
+ src/imports/platform/widgets/qwidgetplatformmenu.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/src/imports/platform/widgets/qwidgetplatformmenu.cpp
++++ b/src/imports/platform/widgets/qwidgetplatformmenu.cpp
+@@ -38,6 +38,7 @@
+ #include "qwidgetplatformmenuitem_p.h"
+ 
+ #include <QtGui/qwindow.h>
++#include <QtGui/private/qhighdpiscaling_p.h>
+ #include <QtWidgets/qmenu.h>
+ #include <QtWidgets/qaction.h>
+ 
+@@ -145,7 +146,7 @@ void QWidgetPlatformMenu::showPopup(const QWindow *window, const QRect &targetRe
+ 
+     QPoint targetPos = targetRect.bottomLeft();
+     if (window)
+-        targetPos = window->mapToGlobal(targetPos);
++        targetPos = window->mapToGlobal(QHighDpi::fromNativeLocalPosition(targetPos, window));
+ 
+     const QWidgetPlatformMenuItem *widgetItem = qobject_cast<const QWidgetPlatformMenuItem *>(item);
+     m_menu->popup(targetPos, widgetItem ? widgetItem->action() : nullptr);
diff --git a/debian/patches/series b/debian/patches/series
index ee2c480..de05f3f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,4 +4,5 @@
 0004-QQuickAbstractButton-fix-crash-on-destruction.patch
 0006-Fix-scroll-bars-not-showing-up-when-binding-to-stand.patch
 0007-implement-a11y-pressing-of-qquickabstractbutton.patch
+0008-Fix-the-popup-position-of-a-Menu.patch
 disable_fontless_examples_build.patch



More information about the Neon-commits mailing list