summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2014-09-17 17:22:27 +0400
committerAlexander Volkov <a.volkov@rusbitech.ru>2014-09-19 23:31:30 +0200
commit34de989a9405152ad635d9d9404f026c96f371cc (patch)
tree7d7b93e582153eef0e1701c1e08dc9c9292c9e43 /src/gui/kernel/qguiapplication.cpp
parentba46c0eef5aee5063e7bfc294b044c4a79233f1d (diff)
Keep a source of propagated mouse events
Synthesized mouse events should not cause mouse events which look like they were obtained from the system. So set the source of generated events from the original event. Change-Id: I862829446ac6ef664e1b8e4a5b54ed11926a1d4b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 70b48ad9ee..6f688c09aa 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1712,7 +1712,8 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo
// with the current event, we fake a move-only event that we recurse and process first. This
// will update the global mouse position and cause the second event to be a button only event.
QWindowSystemInterfacePrivate::MouseEvent moveEvent(e->window.data(),
- e->timestamp, e->type, e->localPos, e->globalPos, buttons, e->modifiers);
+ e->timestamp, e->type, e->localPos, e->globalPos, buttons, e->modifiers, e->source);
+ moveEvent.synthetic = e->synthetic;
processMouseEvent(&moveEvent);
Q_ASSERT(e->globalPos == QGuiApplicationPrivate::lastCursorPosition);
// continue with processing mouse button change event