Revert "Client: Send release button event on pointer leave"
This reverts commit 2aa8de5524cc769daf0b6ec6d29363311b8a441e. It makes tests/manual/examples/widgets/draganddrop/puzzle not work, which does drag and drop in same app. Pick-to: 6.6 6.5 6.2 5.15 Fixes: QTBUG-115757 Task-number: QTBUG-97037 Change-Id: I738769fde96f7da91f5bc4dc7a70ed49596dcd61 Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
parent
46d98302f5
commit
40720551fd
@ -719,8 +719,8 @@ public:
|
||||
|
||||
void QWaylandInputDevice::Pointer::pointer_leave(uint32_t time, struct wl_surface *surface)
|
||||
{
|
||||
releaseButtons();
|
||||
invalidateFocus();
|
||||
mButtons = Qt::NoButton;
|
||||
|
||||
mParent->mTime = time;
|
||||
|
||||
@ -835,8 +835,6 @@ void QWaylandInputDevice::Pointer::pointer_button(uint32_t serial, uint32_t time
|
||||
default: return; // invalid button number (as far as Qt is concerned)
|
||||
}
|
||||
|
||||
mLastButton = qt_button;
|
||||
|
||||
if (state)
|
||||
mButtons |= qt_button;
|
||||
else
|
||||
@ -875,13 +873,10 @@ 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());
|
||||
ReleaseEvent e(focusWindow(), mParent->mTime, mSurfacePos, mGlobalPos, mButtons, Qt::NoButton, mParent->modifiers());
|
||||
window->handleMouse(mParent, e);
|
||||
}
|
||||
}
|
||||
|
@ -336,7 +336,6 @@ public:
|
||||
QPointF mSurfacePos;
|
||||
QPointF mGlobalPos;
|
||||
Qt::MouseButtons mButtons = Qt::NoButton;
|
||||
Qt::MouseButton mLastButton = Qt::NoButton;
|
||||
|
||||
struct FrameData {
|
||||
QWaylandPointerEvent *event = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user