aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2013-05-02 15:57:01 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-04 19:26:14 +0200
commit4730e5d9b3574019f67ba29283308d5020385b59 (patch)
treed562eafad502fdbdb984bcd66cffe041d15effaa /src
parentd9effc96522a2df9567c2dd43ccee00e777add43 (diff)
mouse synthesis: don't say the left button is pressed during a release
Follows the same reasoning as Iefe63cd753f9f8bb04278fd04a4d728e3deda25e in qtbase: buttons should have only the buttons which are still pressed. Change-Id: I894df43254eb1b1ce173fd7acc7190e9765beb48 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/quick/items/qquickwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 2640e661f7..ad13489983 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -411,7 +411,7 @@ static QMouseEvent *touchToMouseEvent(QEvent::Type type, const QTouchEvent::Touc
{
// The touch point local position and velocity are not yet transformed.
QMouseEvent *me = new QMouseEvent(type, transformNeeded ? item->mapFromScene(p.scenePos()) : p.pos(), p.scenePos(), p.screenPos(),
- Qt::LeftButton, Qt::LeftButton, event->modifiers());
+ Qt::LeftButton, (type == QEvent::MouseButtonRelease ? Qt::NoButton : Qt::LeftButton), event->modifiers());
me->setAccepted(true);
me->setTimestamp(event->timestamp());
QVector2D transformedVelocity = p.velocity();