client: Notify application code of button release after leave
There is a code path to notify application code that mouse buttons are released following a drag. Compositors we will have been sent a leave event in the meantime, making this code inert. Focus window will be null, and mButtons will be empty. We still need to send a release event QWindowSystem event to no window, as we need to update any grabs on the device. Pick-to: 6.8 Change-Id: I2a090561c7d3f4669ab2dbc4eb86c8226fe15d1a Fixes: QTBUG-127821 Reviewed-by: David Redondo <qt@david-redondo.de>
This commit is contained in:
parent
e00905d943
commit
885a708e69
@ -833,15 +833,7 @@ void QWaylandInputDevice::Pointer::invalidateFocus()
|
||||
|
||||
void QWaylandInputDevice::Pointer::releaseButtons()
|
||||
{
|
||||
if (mButtons == Qt::NoButton)
|
||||
return;
|
||||
|
||||
mButtons = Qt::NoButton;
|
||||
|
||||
if (auto *window = focusWindow()) {
|
||||
ReleaseEvent e(focusWindow(), mParent->mTime, mSurfacePos, mGlobalPos, mButtons, mLastButton, mParent->modifiers());
|
||||
window->handleMouse(mParent, e);
|
||||
}
|
||||
setFrameEvent(new ReleaseEvent(nullptr, mParent->mTime, mSurfacePos, mGlobalPos, Qt::NoButton, Qt::NoButton, mParent->modifiers()));
|
||||
}
|
||||
|
||||
void QWaylandInputDevice::Pointer::leavePointers()
|
||||
|
Loading…
x
Reference in New Issue
Block a user