[neon/qt/qtwayland/Neon/unstable] debian: Add 0082-Client-Fix-enter-event-cursor-position-with-xdg-popu.patch.
Dmitry Shachnev
null at kde.org
Mon Apr 29 17:44:39 BST 2024
Git commit 03e12d915f2c0fc0c0aedfc1c254060d19bd7741 by Dmitry Shachnev.
Committed on 09/03/2024 at 17:06.
Pushed by jriddell into branch 'Neon/unstable'.
Add 0082-Client-Fix-enter-event-cursor-position-with-xdg-popu.patch.
One more patch from KDE’s collection.
M +2 -0 debian/changelog
A +55 -0 debian/patches/0082-Client-Fix-enter-event-cursor-position-with-xdg-popu.patch
M +1 -0 debian/patches/series
https://invent.kde.org/neon/qt/qtwayland/-/commit/03e12d915f2c0fc0c0aedfc1c254060d19bd7741
diff --git a/debian/changelog b/debian/changelog
index 05e93cf..c3d2adf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ qtwayland-opensource-src (5.15.13-1) UNRELEASED; urgency=medium
* Replace pkg-config build-dependency with pkgconf.
* Drop 0075-client-Fix-infinite-recursion-with-text-input-v2.patch,
included in the new release.
+ * Add 0082-Client-Fix-enter-event-cursor-position-with-xdg-popu.patch,
+ one more patch from KDE’s collection.
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Sat, 09 Mar 2024 14:42:18 +0300
diff --git a/debian/patches/0082-Client-Fix-enter-event-cursor-position-with-xdg-popu.patch b/debian/patches/0082-Client-Fix-enter-event-cursor-position-with-xdg-popu.patch
new file mode 100644
index 0000000..394e721
--- /dev/null
+++ b/debian/patches/0082-Client-Fix-enter-event-cursor-position-with-xdg-popu.patch
@@ -0,0 +1,55 @@
+From c8b37a1bda9b8f29d56775ed6556d56ac5d3ea1d Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010 at ya.ru>
+Date: Sun, 3 Dec 2023 19:12:03 +0400
+Subject: [PATCH] Client: Fix enter event cursor position with xdg-popup and
+ QHighDpiScaling
+
+QWindowSystemInterface::handleEnterEvent accepts device-dependent
+position while QCursor::pos provides device-independent position.
+
+Use QWaylandCursor::pos instead.
+
+Pick-to: 6.6 6.5 6.2 5.15
+Change-Id: I70d2997610f7a34c6763bd4f10f20a65c3debdbe
+Reviewed-by: David Edmundson <davidedmundson at kde.org>
+(cherry picked from commit 8e57e8b51b2b701c5520f37b7d78de5b3c488500)
+---
+ .../shellintegration/xdg-shell/qwaylandxdgshell.cpp | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
++++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+@@ -44,6 +44,7 @@
+ #include <QtWaylandClient/private/qwaylandwindow_p.h>
+ #include <QtWaylandClient/private/qwaylandinputdevice_p.h>
+ #include <QtWaylandClient/private/qwaylandscreen_p.h>
++#include <QtWaylandClient/private/qwaylandcursor_p.h>
+ #include <QtWaylandClient/private/qwaylandabstractdecoration_p.h>
+
+ #include <QtGui/private/qwindow_p.h>
+@@ -229,8 +230,10 @@ QWaylandXdgSurface::Popup::~Popup()
+ leave = m_xdgSurface->window()->window();
+ QWindowSystemInterface::handleLeaveEvent(leave);
+
+- if (QWindow *enter = QGuiApplication::topLevelAt(QCursor::pos()))
+- QWindowSystemInterface::handleEnterEvent(enter, enter->mapFromGlobal(QCursor::pos()), QCursor::pos());
++ if (QWindow *enter = QGuiApplication::topLevelAt(QCursor::pos())) {
++ const auto pos = m_xdgSurface->window()->display()->waylandCursor()->pos();
++ QWindowSystemInterface::handleEnterEvent(enter, enter->handle()->mapFromGlobal(pos), pos);
++ }
+ }
+ }
+
+@@ -465,8 +468,10 @@ void QWaylandXdgSurface::setGrabPopup(QWaylandWindow *parent, QWaylandInputDevic
+ if (m_popup && m_popup->m_xdgSurface && m_popup->m_xdgSurface->window())
+ enter = m_popup->m_xdgSurface->window()->window();
+
+- if (enter)
+- QWindowSystemInterface::handleEnterEvent(enter, enter->mapFromGlobal(QCursor::pos()), QCursor::pos());
++ if (enter) {
++ const auto pos = m_popup->m_xdgSurface->window()->display()->waylandCursor()->pos();
++ QWindowSystemInterface::handleEnterEvent(enter, enter->handle()->mapFromGlobal(pos), pos);
++ }
+ }
+
+ void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial)
diff --git a/debian/patches/series b/debian/patches/series
index 00c5ea6..07878e5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -57,4 +57,5 @@
#0079-Client-Remove-some-surface-commits.patch
0080-Client-Avoid-locking-resizing-in-QWaylandShmBackingS.patch
0081-Client-Always-populate-mimedata-in-drags.patch
+0082-Client-Fix-enter-event-cursor-position-with-xdg-popu.patch
skip_animated_cursor_test.diff
More information about the Neon-commits
mailing list