diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2020-02-15 02:42:28 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2020-02-15 08:59:47 +0100 |
commit | 7cde3ca9e7c5de666cc607e737f984a52f94e021 (patch) | |
tree | 9625b6c02d0dad1e8cc40f9713b2c1d4919d011a /source/l/qt5/patches/qt5.qtbug-66103.patch | |
parent | bea4af160dc640549e07144b9a0dddf09b569861 (diff) | |
download | current-7cde3ca9e7c5de666cc607e737f984a52f94e021.tar.gz |
Sat Feb 15 02:42:28 UTC 202020200215024228
a/kernel-generic-5.4.20-x86_64-1.txz: Upgraded.
a/kernel-huge-5.4.20-x86_64-1.txz: Upgraded.
a/kernel-modules-5.4.20-x86_64-1.txz: Upgraded.
a/shadow-4.8.1-x86_64-3.txz: Rebuilt.
a/util-linux-2.35.1-x86_64-3.txz: Rebuilt.
d/kernel-headers-5.4.20-x86-1.txz: Upgraded.
k/kernel-source-5.4.20-noarch-1.txz: Upgraded.
l/ConsoleKit2-1.2.1-x86_64-2.txz: Rebuilt.
l/dconf-editor-3.34.4-x86_64-1.txz: Upgraded.
l/libxkbcommon-0.10.0-x86_64-1.txz: Added.
l/openal-soft-1.19.1-x86_64-1.txz: Added.
l/qt5-5.13.2-x86_64-1.txz: Added.
Thanks to alienBOB.
n/openssh-8.2p1-x86_64-1.txz: Upgraded.
Potentially incompatible changes:
* ssh(1), sshd(8): the removal of "ssh-rsa" from the accepted
CASignatureAlgorithms list.
* ssh(1), sshd(8): this release removes diffie-hellman-group14-sha1
from the default key exchange proposal for both the client and
server.
* ssh-keygen(1): the command-line options related to the generation
and screening of safe prime numbers used by the
diffie-hellman-group-exchange-* key exchange algorithms have
changed. Most options have been folded under the -O flag.
* sshd(8): the sshd listener process title visible to ps(1) has
changed to include information about the number of connections that
are currently attempting authentication and the limits configured
by MaxStartups.
x/mesa-19.3.4-x86_64-2.txz: Rebuilt.
Reverted "[PATCH] swr: Fix GCC 4.9 checks." which makes X fail to start with
an illegal instruction on some hardware.
isolinux/initrd.img: Rebuilt.
kernels/*: Upgraded.
testing/packages/PAM/ConsoleKit2-1.2.1-x86_64-2_pam.txz: Rebuilt.
Rebuilt with --disable-libcgmanager to fix setting limits on PAM.
Thanks to gattocarlo.
testing/packages/PAM/openssh-8.2p1-x86_64-1_pam.txz: Upgraded.
testing/packages/PAM/shadow-4.8.1-x86_64-3_pam.txz: Rebuilt.
Moved some of the /etc/pam.d/ file to the util-linux package where they
more properly belong.
testing/packages/PAM/util-linux-2.35.1-x86_64-3_pam.txz: Rebuilt.
Added some /etc/pam.d/ files previously in the shadow package.
Changed /etc/pam.d/{chfn,chsh} and made chfn/chsh setuid root to fix them.
Added /etc/pam.d/{runuser,runuser-l}.
usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'source/l/qt5/patches/qt5.qtbug-66103.patch')
-rw-r--r-- | source/l/qt5/patches/qt5.qtbug-66103.patch | 172 |
1 files changed, 172 insertions, 0 deletions
diff --git a/source/l/qt5/patches/qt5.qtbug-66103.patch b/source/l/qt5/patches/qt5.qtbug-66103.patch new file mode 100644 index 00000000..62d1b301 --- /dev/null +++ b/source/l/qt5/patches/qt5.qtbug-66103.patch @@ -0,0 +1,172 @@ +https://code.qt.io/cgit/qt/qtbase.git/patch/?id=4a7771f206d4b29be549d3827c36a46679d90de6 + +From 4a7771f206d4b29be549d3827c36a46679d90de6 Mon Sep 17 00:00:00 2001 +From: Eike Hein <hein@kde.org> +Date: Sun, 7 Jan 2018 13:02:01 +0900 +Subject: QSimpleDrag: Fix mouse release coords for delayed event transmission + +On platforms such as XCB, the drag cursor pixmap is shown via a window +(a QShapedPixmapWindow) under the cursor. + +The mouse button release event at the end of the drag is received in +this QXcbWindow, but intercepted by an event filter that QSimpleDrag +installs on the QApplication. It then resends it unmodified(!) after +the drag has ended and the drag pixmap window destroyed, causing it to +be delivered to the new top-level window. + +The local coordinates in the unmodified QMouseEvent are local to the +drag pixmap window and don't match the window it is delayed-transmitted +to. + +This ends up having fatal, user-visible effects particularly in Qt +Quick: QQuickWindow synthesizes a hover event once per frame using +the last received mouse coordinates, here: the release posted by +QSimpleDrag. This is done to update the hover event state for items +under the cursor when the mouse hasn't moved (e.g. QQuickMouseArea:: +containsMouse). The bogus event coordinates in the release event then +usually end up causing an item near the top-left of the QQuickWindow +to assume it is hovered (because drag pixmap windows tend to be small), +even when the mouse cursor is actually far away from it at the end of +the drag. + +This shows up e.g. in the Plasma 5 desktop, where dragging an icon +on the desktop will cause the icon at the top-left of the screen (if +any) to switch to hovered state, as the release coordinates on the +drag pixmap window (showing a dragged icon) fall into the geometry +of the top-left icon. + +QSimpleDrag contains a topLevelAt() function to find the top-level +window under the global cursor coordinates that is not the drag +pixmap window. This is used by the drop event delivery code. + +This patch uses this function to find the relevant top-level window, +then asks it to map the global cusor coordinates to its local +coordinate system, then synthesizes a new QMouseEvent with local +coordinates computed in this fashion. As a result the window now +gets a release event with coordinates that make sense and are +correct. + +Task-number: QTBUG-66103 +Change-Id: I04ebe6ccd4a991fdd4b540ff0227973ea8896a9d +Reviewed-by: Eike Hein <hein@kde.org> +Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> +--- + src/gui/kernel/qsimpledrag.cpp | 32 +++++++++++++++++++++++++++----- + src/gui/kernel/qsimpledrag_p.h | 6 +++--- + 2 files changed, 30 insertions(+), 8 deletions(-) + +diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp +index a1e25dc53c..87d3ba5915 100644 +--- a/src/gui/kernel/qsimpledrag.cpp ++++ b/src/gui/kernel/qsimpledrag.cpp +@@ -58,6 +58,7 @@ + + #include <QtCore/QEventLoop> + #include <QtCore/QDebug> ++#include <QtCore/QLoggingCategory> + + #include <private/qguiapplication_p.h> + #include <private/qdnd_p.h> +@@ -69,6 +70,8 @@ QT_BEGIN_NAMESPACE + + #ifndef QT_NO_DRAGANDDROP + ++Q_LOGGING_CATEGORY(lcDnd, "qt.gui.dnd") ++ + static QWindow* topLevelAt(const QPoint &pos) + { + QWindowList list = QGuiApplication::topLevelWindows(); +@@ -94,10 +97,10 @@ static QWindow* topLevelAt(const QPoint &pos) + */ + + QBasicDrag::QBasicDrag() : +- m_restoreCursor(false), m_eventLoop(0), ++ m_current_window(nullptr), m_restoreCursor(false), m_eventLoop(nullptr), + m_executed_drop_action(Qt::IgnoreAction), m_can_drop(false), +- m_drag(0), m_drag_icon_window(0), m_useCompositing(true), +- m_screen(Q_NULLPTR) ++ m_drag(nullptr), m_drag_icon_window(nullptr), m_useCompositing(true), ++ m_screen(nullptr) + { + } + +@@ -161,6 +164,7 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e) + return true; // Eat all mouse move events + } + case QEvent::MouseButtonRelease: ++ { + disableEventFilter(); + if (canDrop()) { + QPoint nativePosition = getNativeMousePos(e, m_drag_icon_window); +@@ -169,8 +173,25 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e) + cancel(); + } + exitDndEventLoop(); +- QCoreApplication::postEvent(o, new QMouseEvent(*static_cast<QMouseEvent *>(e))); ++ ++ // If a QShapedPixmapWindow (drag feedback) is being dragged along, the ++ // mouse event's localPos() will be relative to that, which is useless. ++ // We want a position relative to the window where the drag ends, if possible (?). ++ // If there is no such window (belonging to this Qt application), ++ // make the event relative to the window where the drag started. (QTBUG-66103) ++ const QMouseEvent *release = static_cast<QMouseEvent *>(e); ++ const QWindow *releaseWindow = topLevelAt(release->globalPos()); ++ qCDebug(lcDnd) << "mouse released over" << releaseWindow << "after drag from" << m_current_window << "globalPos" << release->globalPos(); ++ if (!releaseWindow) ++ releaseWindow = m_current_window; ++ QPoint releaseWindowPos = (releaseWindow ? releaseWindow->mapFromGlobal(release->globalPos()) : release->globalPos()); ++ QMouseEvent *newRelease = new QMouseEvent(release->type(), ++ releaseWindowPos, releaseWindowPos, release->screenPos(), ++ release->button(), release->buttons(), ++ release->modifiers(), release->source()); ++ QCoreApplication::postEvent(o, newRelease); + return true; // defer mouse release events until drag event loop has returned ++ } + case QEvent::MouseButtonDblClick: + case QEvent::Wheel: + return true; +@@ -349,7 +370,7 @@ static inline QPoint fromNativeGlobalPixels(const QPoint &point) + into account. + */ + +-QSimpleDrag::QSimpleDrag() : m_current_window(0) ++QSimpleDrag::QSimpleDrag() + { + } + +@@ -373,6 +394,7 @@ void QSimpleDrag::startDrag() + updateCursor(Qt::IgnoreAction); + } + setExecutedDropAction(Qt::IgnoreAction); ++ qCDebug(lcDnd) << "drag began from" << m_current_window<< "cursor pos" << QCursor::pos() << "can drop?" << canDrop(); + } + + void QSimpleDrag::cancel() +diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h +index 0b8a0bc703..bbd7f7f4bb 100644 +--- a/src/gui/kernel/qsimpledrag_p.h ++++ b/src/gui/kernel/qsimpledrag_p.h +@@ -105,6 +105,9 @@ protected: + + QDrag *drag() const { return m_drag; } + ++protected: ++ QWindow *m_current_window; ++ + private: + void enableEventFilter(); + void disableEventFilter(); +@@ -132,9 +135,6 @@ protected: + virtual void cancel() Q_DECL_OVERRIDE; + virtual void move(const QPoint &globalPos) Q_DECL_OVERRIDE; + virtual void drop(const QPoint &globalPos) Q_DECL_OVERRIDE; +- +-private: +- QWindow *m_current_window; + }; + + #endif // QT_NO_DRAGANDDROP +-- +cgit v1.1-6-g87c4 + + |