From a0d203cf89d2ae8edf1f2d291d1d646ed2256b6c Mon Sep 17 00:00:00 2001 From: David Redondo Date: Tue, 11 Feb 2025 10:36:39 +0100 Subject: [PATCH] Use the same pointing device for releasing as all other events When we specify no pointing device QWindowSystemInterface will use QPointingDevice::primaryPointingDevice() which is slightly different than what QWaylandWindow will do where the seat name is passed. Task: QTBUG-127821 Pick-to: 6.9 6.8 Change-Id: I77bf7ce0c5b57c205d670923ba348bf6eeec2490 Reviewed-by: David Edmundson --- src/plugins/platforms/wayland/qwaylandinputdevice.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp index a612f3ef331..dfd87bdec6f 100644 --- a/src/plugins/platforms/wayland/qwaylandinputdevice.cpp +++ b/src/plugins/platforms/wayland/qwaylandinputdevice.cpp @@ -1172,10 +1172,12 @@ void QWaylandInputDevice::Pointer::flushFrameEvent() } else if (mFrameData.event->type == QEvent::MouseButtonRelease) { // If the window has been destroyed, we still need to report an up event, but it can't // be handled by the destroyed window (obviously), so send the event here instead. - QWindowSystemInterface::handleMouseEvent(nullptr, event->timestamp, event->local, - event->global, event->buttons, - event->button, event->type, - event->modifiers);// , Qt::MouseEventSource source = Qt::MouseEventNotSynthesized); + QWindowSystemInterface::handleMouseEvent( + nullptr, event->timestamp, + QPointingDevice::primaryPointingDevice(mParent->seatname()), event->local, + event->global, event->buttons, event->button, event->type, + event->modifiers); // , Qt::MouseEventSource source = + // Qt::MouseEventNotSynthesized); } delete mFrameData.event; mFrameData.event = nullptr;