diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2014-09-12 15:41:44 +0400 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2014-09-16 14:02:32 +0200 |
commit | a9d029974ea27417f9c75a6cd6d4f1d4434635f0 (patch) | |
tree | afda7e8a72a67954d03f8f8079f805e1ea2a351e /src | |
parent | 05605b774eced0e8ddc3fa8c30ec618cad5412cd (diff) |
Change the state of only the left mouse button when sending fake mouse events
Mouse events synthesized from touch events affect only the left mouse button.
So preserve the state of other buttons.
Change-Id: I628d41089db39f0c983aa95f311a842111b8c39c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 19f15d88bf..7dcadf74a8 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2272,7 +2272,7 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To e->timestamp, synthIt->pos, synthIt->screenPos, - Qt::NoButton, + buttons & ~Qt::LeftButton, e->modifiers, Qt::MouseEventSynthesizedByQt); fake.synthetic = true; @@ -2474,7 +2474,8 @@ void QGuiApplicationPrivate::processTouchEvent(QWindowSystemInterfacePrivate::To QWindowSystemInterfacePrivate::MouseEvent fake(w, e->timestamp, touchPoint.pos(), touchPoint.screenPos(), - b, e->modifiers); + b | (buttons & ~Qt::LeftButton), + e->modifiers); fake.synthetic = true; processMouseEvent(&fake); break; |