summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandinputdevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandinputdevice.cpp')
-rw-r--r--src/client/qwaylandinputdevice.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 669deac2a..c3b6cf453 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -260,6 +260,8 @@ void QWaylandInputDevice::handleEndDrag()
{
if (mTouch)
mTouch->releasePoints();
+ if (mPointer)
+ mPointer->releaseButtons();
}
void QWaylandInputDevice::setDataDevice(QWaylandDataDevice *device)
@@ -516,6 +518,14 @@ void QWaylandInputDevice::Pointer::pointer_button(uint32_t serial, uint32_t time
}
}
+void QWaylandInputDevice::Pointer::releaseButtons()
+{
+ mButtons = Qt::NoButton;
+ MotionEvent e(mParent->mTime, mSurfacePos, mGlobalPos, mButtons, mParent->modifiers());
+ if (mFocus)
+ mFocus->handleMouse(mParent, e);
+}
+
class WheelEvent : public QWaylandPointerEvent
{
public: