summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2023-03-19 10:20:11 +0400
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-03-21 13:25:50 +0000
commit5708d0147ab690ff9f8803124facc9f079e7b162 (patch)
tree7ee47f317ecc740c4a14d46e17cad2a322514b33
parent325a2338976c3cca6278436af03e7bd4e4378d7c (diff)
downloadqtwayland-5708d0147ab690ff9f8803124facc9f079e7b162.tar.gz
Client: Fix the mouse being stuck in pressed state after DnD
I can still reproduce the problem using QtWidgets applications on KDE Plasma 5.27. Both Windows and macOS QPA have a similar quirk and they both send a MouseButtonRelease event rather than a MouseMove event. Amends f7a386eeaec8e6314c1be7de5e14e9fe3847f9ba Task-number: QTBUG-97037 Change-Id: I864a1cb68b3660d858623f943b3958f7cafbf955 Reviewed-by: David Edmundson <davidedmundson@kde.org> (cherry picked from commit e3c74961b1c7415fd94678802ad7f8173d0be4c1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/client/qwaylandinputdevice.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 00e9e09f..b307fb43 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -864,7 +864,7 @@ void QWaylandInputDevice::Pointer::releaseButtons()
mButtons = Qt::NoButton;
if (auto *window = focusWindow()) {
- MotionEvent e(focusWindow(), mParent->mTime, mSurfacePos, mGlobalPos, mButtons, mParent->modifiers());
+ ReleaseEvent e(focusWindow(), mParent->mTime, mSurfacePos, mGlobalPos, mButtons, Qt::NoButton, mParent->modifiers());
window->handleMouse(mParent, e);
}
}