From c3adb5647835bc97ebe9023481bde5a4b9e17127 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sun, 19 Mar 2023 10:20:11 +0400 Subject: 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 (cherry picked from commit e3c74961b1c7415fd94678802ad7f8173d0be4c1) Reviewed-by: Qt Cherry-pick Bot --- src/client/qwaylandinputdevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index 825eeb1f9..c907a1081 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -892,7 +892,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); } } -- cgit v1.2.3