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 <davidedmundson@kde.org>
This commit is contained in:
David Redondo 2025-02-11 10:36:39 +01:00
parent d7731dd110
commit a0d203cf89

View File

@ -1172,10 +1172,12 @@ void QWaylandInputDevice::Pointer::flushFrameEvent()
} else if (mFrameData.event->type == QEvent::MouseButtonRelease) { } 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 // 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. // be handled by the destroyed window (obviously), so send the event here instead.
QWindowSystemInterface::handleMouseEvent(nullptr, event->timestamp, event->local, QWindowSystemInterface::handleMouseEvent(
event->global, event->buttons, nullptr, event->timestamp,
event->button, event->type, QPointingDevice::primaryPointingDevice(mParent->seatname()), event->local,
event->modifiers);// , Qt::MouseEventSource source = Qt::MouseEventNotSynthesized); event->global, event->buttons, event->button, event->type,
event->modifiers); // , Qt::MouseEventSource source =
// Qt::MouseEventNotSynthesized);
} }
delete mFrameData.event; delete mFrameData.event;
mFrameData.event = nullptr; mFrameData.event = nullptr;